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
| # Automatically call nvm use on directory change | |
| # Only changes version if .nvmrc is found | |
| autoload -U add-zsh-hook | |
| load-nvmrc() { | |
| local nvmrc_path="$(nvm_find_nvmrc)" | |
| if [ -n "$nvmrc_path" ]; then | |
| local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")") | |
| if [ "$nvmrc_node_version" = "N/A" ]; then |
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
| /** | |
| First install and run ganache. | |
| > npm install ganache --global | |
| > execute this code https://gist.github.com/bertolo1988/096d436f072d2513eb4ff1cd83201c47 | |
| **/ | |
| const Web3EthAccounts = require('web3-eth-accounts'); | |
| const PORT = 61063; |
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 ganache = require('ganache'); | |
| const options = {}; | |
| const server = ganache.server(options); | |
| const PORT = 0; // 0 means any available port | |
| server.listen(PORT, async (err) => { | |
| if (err) throw err; | |
| console.log(`ganache listening on port ${server.address().port}...`); | |
| }); |
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
| Method name | clone is callable | typeof is function | enumerable properties | name | prototype | constructor | clone is independent | |
|---|---|---|---|---|---|---|---|---|
| cloneJSON | β | β | β | β | β | β | β | |
| structuredClone | β | β | β | β | β | β | β | |
| underscoreContribClone | β | β | β | β | β | β | β | |
| cloneNemisj | β | β | β | β | β | β | β | |
| cloneTrincot | β | β | β | β | β | β | β | |
| cloneKoolDandy | β | β | β | β | β | β | β | |
| cloneRfdc | β | β | β | β | β | β | β | |
| justClone | β | β | β | β | β | β | β | |
| cloneDeep | β | β | β | β | β | β | β |
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
| Method name | should clone an object with circular reference to an element of the array | |
|---|---|---|
| cloneJSON | β | |
| structuredClone | β | |
| underscoreContribClone | β | |
| cloneNemisj | β | |
| cloneTrincot | β | |
| cloneKoolDandy | β | |
| cloneRfdc | β | |
| justClone | β | |
| cloneDeep | β |
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
| Method name | __proto__ by referencing | clones the __proto__ | non enumerable properties in the prototype | |
|---|---|---|---|---|
| cloneJSON | β | β | β | |
| structuredClone | β | β | β | |
| underscoreContribClone | β | β | β | |
| cloneNemisj | β | β | β | |
| cloneTrincot | β | β | β | |
| cloneKoolDandy | β | β | β | |
| cloneRfdc | β | β | β | |
| justClone | β | β | β | |
| cloneDeep | β | β | β |
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
| Method name | frozen | sealed | non extensible | |
|---|---|---|---|---|
| cloneJSON | β | β | β | |
| structuredClone | β | β | β | |
| underscoreContribClone | β | β | β | |
| cloneNemisj | β | β | β | |
| cloneTrincot | β | β | β | |
| cloneKoolDandy | β | β | β | |
| cloneRfdc | β | β | β | |
| justClone | β | β | β | |
| cloneDeep | β | β | β |
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
| Method name | getter | setter | enumerable | non enumerable | enumerable and writable | non enumerable non writable and configurable | non enumerable writable and non configurable | non enumerable non writable and non configurable | own symbol | |
|---|---|---|---|---|---|---|---|---|---|---|
| cloneJSON | β | β | β | β | β | β | β | β | β | |
| structuredClone | β | β | β | β | β | β | β | β | β | |
| underscoreContribClone | β | β | β | β | β | β | β | β | β | |
| cloneNemisj | β | β | β | β | β | β | β | β | β | |
| cloneTrincot | β | β | β | β | β | β | β | β | β | |
| cloneKoolDandy | β | β | β | β | β | β | β | β | β | |
| cloneRfdc | β | β | β | β | β | β | β | β | β | |
| justClone | β | β | β | β | β | β | β | β | β | |
| cloneDeep | β | β | β | β | β | β | β | β | β |
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
| Method name | shallow object | non shallow object | circular references | typeof | constructor | |
|---|---|---|---|---|---|---|
| cloneJSON | β | β | β | β | β | |
| structuredClone | β | β | β | β | β | |
| underscoreContribClone | β | β | β | β | β | |
| cloneNemisj | β | β | β | β | β | |
| cloneTrincot | β | β | β | β | β | |
| cloneKoolDandy | β | β | β | β | β | |
| cloneRfdc | β | β | β | β | β | |
| justClone | β | β | β | β | β | |
| cloneDeep | β | β | β | β | β |
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
| Method name | string | number | boolean | undefined | null | Symbol | BigInt | |
|---|---|---|---|---|---|---|---|---|
| cloneJSON | β | β | β | β | β | β | β | |
| structuredClone | β | β | β | β | β | β | β | |
| underscoreContribClone | β | β | β | β | β | β | β | |
| cloneNemisj | β | β | β | β | β | β | β | |
| cloneTrincot | β | β | β | β | β | β | β | |
| cloneKoolDandy | β | β | β | β | β | β | β | |
| cloneRfdc | β | β | β | β | β | β | β | |
| justClone | β | β | β | β | β | β | β | |
| cloneDeep | β | β | β | β | β | β | β |
NewerOlder