30-seconds-code Snippet
30-seconds-code
The extension that provide JavaScript for using in Visual Studio Code.
Recommended configurations
To keep snippets to show on the top of suggestions for easy using, use this configuration.
{
"editor.snippetSuggestions": "top"
}
Snippets
30-seconds-code
usage
tc-all
const all = (arr, fn = Boolean) => arr.every(fn);
all([4, 2, 3], x => x > 1); // true
all([1, 2, 3]); // true
tc-allEqual
const allEqual = arr => arr.every(val => val === arr[0]);
allEqual([1, 2, 3, 4, 5, 6]); // false
allEqual([1, 1, 1, 1]); // true
tc-*