Type | Explanation | Minimum size (bytes) | Minimum range | Format specifier |
---|---|---|---|---|
char |
Smallest addressable unit of the mach |
This file contains 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
(function (root, factory) { | |
if (typeof define === "function" && define.amd) { | |
// AMD | |
define([], factory); | |
} else if (typeof module === "object" && module.exports) { | |
// Node | |
module.exports = factory(); | |
} else { | |
// Browsers | |
root.logdf5e4y = factory(); |
This file contains 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 makeQueryablePromise = (promise) => { | |
if (promise.isFulfilled) { | |
return promise | |
} | |
let isPending = true | |
let isRejected = false | |
let isFulfilled = false | |
const result = promise.then( |
This file contains 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
/* | |
Below is the result for the method 'set' of Map/Object/Array, when both keys and values are from 0 to 9999. | |
Method 'set' of Map x 3,983 ops/sec ±0.21% (94 runs sampled) | |
Method 'set' of Object x 6,265 ops/sec ±0.31% (96 runs sampled) | |
Method 'set' of Array x 35,736 ops/sec ±0.37% (93 runs sampled) | |
Fastest is Method 'set' of Array | |
Below is the result for the method 'has' (or similar) of Map/Object/Array, when both keys and values are from 0 to 9999. | |
Method 'has' of Map x 6,244 ops/sec ±1.33% (94 runs sampled) | |
Method 'in' of Object x 63,996 ops/sec ±0.27% (95 runs sampled) |
I hereby claim:
- I am tomchen on github.
- I am tomchenorg (https://keybase.io/tomchenorg) on keybase.
- I have a public key whose fingerprint is C258 C4AF ECBC 1C27 A1F4 6CD5 3E37 9127 BF71 FD68
To claim this, I am signing this object:
This file contains 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
//ES6 class vs ES5 constructor function | |
// ES6 class | |
class MyClass { | |
// is executed upon instantiation, not to be used as a normal method | |
// proposal class properties | |
// https://babeljs.io/docs/en/babel-plugin-proposal-class-properties | |
// https://github.com/tc39/proposal-class-fields |