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 chai, { expect } from 'chai'; | |
import chaiAsPromised from 'chai-as-promised'; | |
import sinon from 'sinon'; | |
import sinonChai from 'sinon-chai'; | |
import sinonStubPromise from 'sinon-stub-promise'; | |
chai.use(chaiAsPromised); | |
chai.use(sinonChai); | |
sinonStubPromise(sinon); |
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
// 1. trimming and padding | |
// https://github.com/tc39/proposal-string-left-right-trim | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/TrimLeft | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart | |
console.log(" 123 ".trim() === "123"); // true | |
console.log(" 123 ".trimStart() === "123 "); // true | |
console.log(" 123 ".trimEnd() === " 123"); // true | |
console.log("123".padStart(6, "0")); // 000123 |
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
FROM node:8 | |
# check installed node and npm | |
RUN node -v && npm -v | |
# check the path where the npm is installed | |
RUN find / -name "npm-cli.js" | |
# list all node_modules from the npm folder | |
RUN ls -la /usr/local/lib/node_modules/npm/node_modules |
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
// generators | |
// http://exploringjs.com/es6/ch_generators.html | |
// https://github.com/getify/You-Dont-Know-JS/blob/master/async%20%26%20performance/ch4.md#chapter-4-generators |
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
// parameter handling | |
// http://exploringjs.com/es6/ch_parameter-handling.html |
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
// symbols | |
// http://exploringjs.com/es6/ch_symbols.html | |
// https://github.com/getify/You-Dont-Know-JS/blob/master/es6%20%26%20beyond/ch2.md#symbols | |
// https://github.com/getify/You-Dont-Know-JS/blob/master/es6%20%26%20beyond/ch7.md#well-known-symbols |
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
// api | |
// http://exploringjs.com/es6/ch_maps-sets.html | |
// http://exploringjs.com/es6/ch_arrays.html | |
// https://github.com/getify/You-Dont-Know-JS/blob/master/es6%20%26%20beyond/ch6.md | |
// https://developer.mozilla.org/en-US/docs/tag/ECMAScript%202015?page=1 |
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
// classes | |
// http://exploringjs.com/es6/ch_classes.html | |
// https://github.com/getify/You-Dont-Know-JS/blob/master/es6%20%26%20beyond/ch3.md#classes |