Skip to content

fractaltech/shape-errors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

javascript: A simple lib for finding errors in data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published