Created
November 16, 2016 12:54
-
-
Save zspecza/1a32492b24d40e7a7fef58e9b1553d2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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