Last active
November 16, 2016 19:45
-
-
Save zspecza/1819069dfcb16c955f95214846b7c138 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, | |
validateTransformed, | |
(validated, callback) => callback(null, validated, 'data is valid:') | |
) | |
validateTransformation({ foo: 'bar' }, (error, validated, label) => { | |
if (error) { | |
console.error(new Error(error)) | |
} else { | |
console.log(label, validated) | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment