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
// You probobly don't need a helper library for Promise/Async after all | |
const seedValues = [Promise.resolve(777), Promise.resolve(888)]; | |
// reduce | |
// Promise based | |
seedValues | |
.reduce((accumulator, currentValue) => | |
accumulator.then(v => currentValue.then(cv => v + cv)) | |
) |
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 () { | |
'use strict'; | |
var duringErrorTrack = false; | |
var ua = 'UA-XXXXXX-X' | |
// don't break old browsers | |
if (!window.addEventListener) { | |
return; | |
} |
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
. | |
├── node_modules | |
│ └── @types | |
│ ├── fs-extra | |
│ │ ├── LICENSE | |
│ │ ├── README.md | |
│ │ ├── index.d.ts | |
│ │ └── package.json | |
│ └── node | |
│ ├── LICENSE |
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
. | |
├── node_modules | |
│ └── @types | |
│ ├── fs-extra | |
│ │ ├── LICENSE | |
│ │ ├── README.md | |
│ │ ├── index.d.ts | |
│ │ ├── node_modules | |
│ │ │ └── @types | |
│ │ │ └── node |
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 _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; } | |
var id = 0; | |
function _classPrivateFieldLooseKey(name) { return "__private_" + id++ + "_" + name; } | |
class Person { | |
constructor() { | |
Object.defineProperty(this, _increaseAge, { | |
value: _increaseAge2 |
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
import React from "react"; | |
import fs from "fs"; | |
console.log(React, fs, __filename); |
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
{ | |
"name": "giltype", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"devDependencies": { | |
"typescript": "^3.8.3" | |
} | |
} |
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
Show hidden characters
{ | |
"typeAcquisition": {}, | |
"compilerOptions": { | |
"module": "commonjs", | |
"target": "es6", | |
"checkJs": true | |
}, | |
"include": ["wat.js"], | |
} |
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
import assert from "assert"; | |
assert.strictEqual(4, 4); |
OlderNewer