This file contains hidden or 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
| "editor.wordWrap": "wordWrapColumn", |
This file contains hidden or 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
| "workbench.colorTheme": "Monokai Vibrant", | |
| "workbench.iconTheme": "vscode-icons", |
This file contains hidden or 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
| "rainbowTags.allowEverywhere": true, |
This file contains hidden or 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
| "emmet.triggerExpansionOnTab": true, |
This file contains hidden or 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
| "js/ts.implicitProjectConfig.checkJs": true |
This file contains hidden or 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
| const myObject = {} | |
| console.log(typeof myObject) // "object" | |
| console.log(Array.isArray(myObject)) // false | |
| const myArray = [] | |
| console.log(typeof myArray) // "object" | |
| console.log(Array.isArray(myArray)) // true | |
| const myNull = null | |
| console.log(typeof myNull) // "object" |
This file contains hidden or 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
| const isArray = (maybeArray) => | |
| Object.prototype.toString.call(maybeArray).slice(8, -1) === "Array" | |
| const myObject = {} | |
| console.log(Object.prototype.toString.call(myObject)) // [object Object] | |
| console.log(Object.prototype.toString.call(myObject).slice(8, -1)) // Object | |
| console.log(isArray(myObject)) // false | |
| const myArray = [] | |
| console.log(Object.prototype.toString.call(myArray)) // [object Array] |
This file contains hidden or 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
| const isArray = (maybe) => maybe.constructor.name === "Array" | |
| const myObject = {} | |
| console.log(myObject.constructor) // function Object() | |
| console.log(myObject.constructor.name) // Object | |
| console.log(isArray(myObject)) // false | |
| const myArray = [] | |
| console.log(myArray.constructor) // function Array() | |
| console.log(myArray.constructor.name) // Array |
This file contains hidden or 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
| // NOTE: instanceof won't work inside iframes | |
| const myObject = {} | |
| console.log(myObject instanceof Object) // true | |
| console.log(myObject instanceof Array) // false | |
| const myArray = [] | |
| console.log(myArray instanceof Object) // true | |
| console.log(myArray instanceof Array) // true | |
| const myNull = null |
This file contains hidden or 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
| const isArray = (maybeArray) => maybeArray && maybeArray.constructor === Array | |
| const myObject = {} | |
| console.log(myObject && myObject.constructor) // function Object() | |
| console.log(myObject && myObject.constructor.name) // Object | |
| console.log(isArray(myObject)) // false | |
| const myArray = [] | |
| console.log(myArray && myArray.constructor) // function Array() | |
| console.log(myArray && myArray.constructor.name) // Array |