{{ message }}

Instantly share code, notes, and snippets.

💭
#BlackLivesMatter

# Kyle KyleMit

💭
#BlackLivesMatter
Last active Jun 9, 2021
View index.html
Last active Jun 9, 2021
Walker's Algorithm
View index.html
 Walkers
Created Oct 26, 2020
View find-index.js
 let pets = [ { name: "Ranger", type: "Dog" }, { name: "Gill", type: "Cat" }, { name: "Frida", type: "Cat" } ] let startWithGIndex = pets.findIndex(el => el.name.startsWith("G")) console.log(nameStartWithGIndex) // 1
Created Oct 26, 2020
 let checkValInList = (val, ignoreCase, ...list) => { return ignoreCase ? list.some(el => el.toLowerCase() === val.toLowerCase()) : list.includes(val) } checkValInList("hello", true, "Hi", "Hello", "Howdy") // true checkValInList("hello", false, "Hi", "Hello", "Howdy") // false
Created Oct 26, 2020
View includes.js
 console.log(~"apple".indexOf("a")) // true console.log("apple".indexOf("a") >= 0) // true console.log("apple".includes("a")) // true
Created Oct 26, 2020
View autocomplete.html

Created Oct 26, 2020
View barrel-up.js
 // index.ts export { Dog } from 'dog/dog.component.ts'; export { Cat } from 'cat/cat.component.ts'; // module.ts import { Cat, Dog } from 'index.ts';
Created Oct 26, 2020
Twitter - Logical OR Assignment Operator
View logical-or-assignment-operator.js
 let person = { name: "Frida" } // original person.city = person.city || "unknown" // with logical or assignment operator person.city ||= "unknown"
Created Oct 23, 2020
Twitter - Customize VS Code UI
View customize-vs-code.json
 { "customizeUI.stylesheet": { ".editor-actions .codicon-compare-changes": "display: none !important;", ".editor-actions .codicon-open-preview": "display: none !important;", ".editor-actions .codicon-split-horizontal": "display: none !important;", ".editor-actions .codicon-toolbar-more": "display: none !important;" }, }
Created Oct 23, 2020