shape-errors

3.0.3 • Public • Published

shape-errors

v3.0.3

We follow [breaking].[feature].[fix] versioning.

const shape = require('shape-erros');
const s = shape({
  user_id: (userId) => userExists(userId).then((result) => result ? null : 'invalid user'),
  name: (name, {user_id}) => findUserByName(name).then((user) => user.id === user_id ? null : 'invalid name')
})
 
s.errors(data).then((errors) => {})

Readme

Keywords

none

Package Sidebar

Install

npm i shape-errors

Weekly Downloads

2

Version

3.0.3

License

ISC

Unpacked Size

23.7 kB

Total Files

8

Last publish

Collaborators

  • kapv89