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) => {})

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.0.31latest

Version History

VersionDownloads (Last 7 Days)Published
3.0.31
3.0.20
3.0.10
3.0.00
2.0.20
2.0.10
2.0.00
1.2.00
1.1.00
1.0.10
1.0.00

Package Sidebar

Install

npm i shape-errors

Weekly Downloads

1

Version

3.0.3

License

ISC

Unpacked Size

23.7 kB

Total Files

8

Last publish

Collaborators

  • kapv89