Skip to content

Instantly share code, notes, and snippets.

@nelreina
Last active December 6, 2017 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nelreina/68118119721e602e4a482fda1d2fc06f to your computer and use it in GitHub Desktop.
Save nelreina/68118119721e602e4a482fda1d2fc06f to your computer and use it in GitHub Desktop.
"Require Node Module": {
"prefix": "creq",
"body": ["const ${1:module} = require('${1:module}');"],
"description": "Require Node Module"
},
"Require Local File Node Module": {
"prefix": "cfreq",
"body": ["const ${2:module} = require('.${1:file}');"],
"description": "Require Node Module"
},
"Console Info": {
"prefix": "cinfo",
"body": ["console.info(`${1:info} \\${${2:var}\\}`);"],
"description": "Console Info"
},
{
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
},
"Print JSON in text": {
"prefix": "jss",
"body": "JSON.stringify(${1:data}, null, 2)"
},
"Spread props": {
"prefix": "cps",
"body": "const { $1 } = this.props;$2"
},
"Print JSON in text and Pre": {
"prefix": "pjss",
"body": [
"<pre>",
"{JSON.stringify(${1:data}, null, 2)}",
"</pre>"
]
},
"React Component constructor": {
"prefix": "ctor",
"body": [
"constructor(props) {",
"super(props);",
"this.state = {};",
"this.${1:method} = this.${1:method}.bind(this);",
"}"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment