Last active
May 10, 2016 14:53
-
-
Save rystsov/3c3efd10754cc8f585ed5710f9a0cebc 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
function sign(value, general) { | |
value.signOffs[general] = true; | |
if (len(value.signOffs) == 2) { | |
value.isSent = true; | |
} | |
return value; | |
} | |
function unsign(value, general) { | |
if (value == null) { | |
value = {signOffs: {}, isSent: false}; | |
} | |
if (!value.isSent) { | |
delete value.signOffs[general]; | |
} | |
return value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
%s/signs/signOffs/