A snippet pack to make you more productive working with JavaScript.
This extension ships a bunch of useful code snippets for the JavaScript and TypeScript editors.
Here's the full list of all the snippets:
console.dir(%c%);
console.error(%c%);
console.info(%c%);
console.log(%c%);
console.warn(%c%);
debugger;
%c%document.addEventListener('%c%load', function(e) {
%c%
});
%c%document.appendChild(%c%elem);
%c%document.removeChild(%c%elem);
%c%document.createElement(%c%elem);
%c%document.createDocumentFragment();
%c%document.classList.add('%c%class');
%c%document.classList.toggle('%c%class');
%c%document.classList.remove('%c%class');
%c%document.getElementById('%c%id');
%c%document.getElementsByClassName('%c%class');
%c%document.getElementsByTagName('%c%tag');
%c%document.getAttribute('%c%attr');
%c%document.setAttribute('%c%attr', %c%);
%c%document.removeAttribute('%c%attr');
%c%document.innerHTML = '%c%elem';
%c%document.textContent = '%c%content';
%c%document.querySelector('%c%selector');
%c%document.querySelectorAll('%c%selector');
%c%array.forEach(function(item) {
%c%
});
function %c%methodName (%c%arguments) {
%c%// body
}
function(%c%arguments) {
%c%// body
}
%c%object.prototype.%c%method = function(%c%arguments) {
%c%// body
}
(function(%c%window, %c%document) {
%c%// body
})(%c%window, %c%document);
%c%.call(%c%context, %c%arguments)
%c%.apply(%c%context, [%c%arguments])
%c%: function(%c%arguments) {
%c%// body
}
JSON.parse(%c%);
JSON.stringify(%c%);
setInterval(function() {
%c%// body
}, %c%1000);
setTimeout(function() {
%c%
}, %c%1000);
'use strict';
alert('%c%msg');
confirm('%c%msg');
prompt('%c%msg');