3.0.3 • Published 5 years ago

shape-errors v3.0.3

Weekly downloads
6
License
ISC
Repository
github
Last release
5 years ago

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

5 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.1

8 years ago

1.0.0

8 years ago