Last active
November 25, 2017 21:28
-
-
Save krogla/56c2b4fc9045f438b4645a60c8253168 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
//Remove contracts by ID | |
CustomContracts.find().fetch(); | |
CustomContracts.remove("_CONTRACT_ID_"); | |
//Remove tokens by ID | |
Tokens.find().fetch(); | |
Tokens.remove("_TOKEN_ID_"); | |
//Remove all contracts | |
CustomContracts.find().fetch().map( | |
function(m) { CustomContracts.remove(m._id);} | |
); | |
//remove only with condition | |
CustomContracts.find().fetch().map( | |
function(m) { if (m.name == '-') {CustomContracts.remove(m._id);}} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment