Skip to content

Instantly share code, notes, and snippets.

@zspecza
Created November 16, 2016 12:54
Show Gist options
  • Save zspecza/1a32492b24d40e7a7fef58e9b1553d2b to your computer and use it in GitHub Desktop.
Save zspecza/1a32492b24d40e7a7fef58e9b1553d2b to your computer and use it in GitHub Desktop.
const validateTransformation = sequentialCallback(
transformSomething,
validateSomething
)
const something = { foo: 'bar' }
validateTransformation(something, (error, validated) => {
if (error) {
console.error(new Error(error))
} else {
console.log('data is valid:', validated)
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment