Last active
August 4, 2020 10:35
-
-
Save favio41/25d167f2ab4824674a5bceaf1ba1c4d2 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
{ | |
"Print object to console":{ | |
"prefix": "stringify", | |
"body": "console.log(\"stringify $0\", JSON.stringify($0, null, 2))" | |
}, | |
"Safe print object to console":{ | |
"prefix": "stringifysafe", | |
"body": "console.log('inspect $0',require('util').inspect($0))" | |
}, | |
"saveToFile":{ | |
"prefix": "stringifyToFile", | |
"body": "require('fs').writeFileSync('/tmp/$1.json', JSON.stringify($0, null, 2))" | |
}, | |
"Print keys to console":{ | |
"prefix": "keys", | |
"body": "console.log(Object.keys($0))" | |
}, | |
"Parse JSON":{ | |
"prefix": "parse", | |
"body": "JSON.parse($0)" | |
}, | |
"usestrict":{ | |
"prefix": "usestrict", | |
"body": [ | |
"'use strict'", | |
"", | |
] | |
}, | |
"eslint-disable": { | |
"prefix": "eslint-disable", | |
"body": "// eslint-disable-line" | |
}, | |
"max-len": { | |
"prefix": "max-len", | |
"body": " // eslint-disable-line max-len" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment