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
// Place your key bindings in this file to override the defaults | |
[ | |
{ | |
"key": "ctrl+r", | |
"command": "editor.action.insertSnippet", | |
"args": { | |
"snippet": "console.log('${CLIPBOARD}', ${CLIPBOARD})" | |
}, | |
} | |
] |
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 arg1(arg){return arg === 1} | |
function arg2(arg){return arg !== 1} | |
function combineFilters(filters) { | |
return filters.reduce(function (prev, curr) { | |
return function (arg) { | |
return prev(arg) && curr(arg) | |
} | |
}, function (){return true}) |
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
componentWillMount () { | |
this.foo(this.props) | |
}, | |
componentWillReceiveProps (nextProps) { | |
this.foo(nextProps) | |
}, | |
foo(props) { | |
//code | |
} |
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
// UPD: | |
// Now available as npm module! | |
// Check out https://github.com/RReverser/better-log for details. | |
console.log = (function (log, inspect) { | |
return function () { | |
return log.apply(this, Array.prototype.map.call(arguments, function (arg) { | |
return inspect(arg, { depth: 1, colors: true }); | |
})); | |
}; |