Last active
January 9, 2017 16:24
-
-
Save bdavidxyz/59289f3cd5c817b03e8c31f1c8eb265a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function labeledCheckboxes (proposals, answers) { | |
// check pre-conditions | |
if (_(proposals).isEmpty()) return []; | |
if !(_(proposals).isArray && _.every(proposals, _.isString)) return []; | |
if !(_(proposals).isArray && _.every(proposals, _.isBoolean)) return []; | |
if (_(answers).size() > _(proposals).size()) return []; | |
// etc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment