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
| function resolver (val, keys, list) { | |
| var key = '' | |
| keys.forEach((item) => { | |
| key += '[\'' + item + '\']' | |
| }) | |
| eval('list' + key + '=\'' + val + '\'') | |
| return list | |
| } | |
| var val = 'val' |
Before
$ rm package-lock.json && npm i
npm notice created a lockfile as package-lock.json. You should commit this file.
npm notice optional SKIPPING OPTIONAL DEPENDENCY: c@file:../c (node_modules/c):
npm notice notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for c@1.0.0: wanted {"os":"win32","arch":"any"} (current: {"os":"darwin","arch":"x64"})After
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
| $ npm i | |
| > botframework-webchat@0.10.6 prepare /Users/daijiro/Development/tmp/d/BotFramework-WebChat | |
| > tsc && npm run build-css && webpack --progress --config webpack.production.config.js | |
| node_modules/@types/react/index.d.ts(191,27): error TS1005: ',' expected. | |
| node_modules/@types/react/index.d.ts(191,29): error TS1005: '>' expected. | |
| node_modules/@types/react/index.d.ts(191,31): error TS1128: Declaration or statement expected. | |
| node_modules/@types/react/index.d.ts(191,41): error TS1109: Expression expected. | |
| node_modules/@types/react/index.d.ts(212,27): error TS1005: ',' expected. |
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
| git clone https://gist.github.com/6330dcdc0e7a516c8ff75aff0b2085b6.git | |
| cd 6330dcdc0e7a516c8ff75aff0b2085b6 | |
| npm i | |
| npm test |
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
| { | |
| "name":"reactapp", | |
| "version":"1.0.0", | |
| "description":"", | |
| "main":"index.js", | |
| "scripts":{ | |
| "start":"webpack-dev-server --hot" | |
| }, | |
| "author":"", | |
| "license":"ISC", |
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 fs = require('fs') | |
| const os = require('os') | |
| const path = require('path') | |
| const file = path.resolve(os.tmpdir(), 'hello-world') | |
| const fd = fs.openSync(file, 'a') | |
| fs.writeSync(fd, 'hello world') | |
| fs.closeSync(fd) |
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
| $ node benchmark/compare.js --new ./out/Release/node --old ../old/out/Release/node -- querystring > compare-pr-10967.csv | |
| [01:79:42|% 100| 3/3 files | 60/60 runs | 4/4 configs]: Done | |
| $ cat compare-pr-10967.csv | Rscript benchmark/compare.R | |
| querystring/querystring-parse.js n=1000000 type="encodefake" 0.32 % 0.73430045 | |
| querystring/querystring-parse.js n=1000000 type="encodelast" -2.35 % * 0.02302482 | |
| querystring/querystring-parse.js n=1000000 type="encodemany" -1.94 % 0.05450528 | |
| querystring/querystring-parse.js n=1000000 type="manypairs" 0.61 % 0.64289511 | |
| querystring/querystring-parse.js n=1000000 type="multicharsep" |
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
| $ node benchmark/compare.js --new ./out/Release/node --old ../old/out/Release/node -- querystring | |
| "binary", "filename", "configuration", "rate", "time" | |
| "old", "querystring/querystring-parse.js", "n=1000000 type=""noencode""", 532292.3115166232, 1.878667 | |
| "old", "querystring/querystring-parse.js", "n=1000000 type=""multicharsep""", 479377.65275608597, 2.086038 | |
| "old", "querystring/querystring-parse.js", "n=1000000 type=""encodefake""", 520405.3541384455, 1.921579 | |
| "old", "querystring/querystring-parse.js", "n=1000000 type=""encodemany""", 247753.7407098541, 4.036266 | |
| "old", "querystring/querystring-parse.js", "n=1000000 type=""encodelast""", 441041.7582747152, 2.267359 | |
| "old", "querystring/querystring-parse.js", "n=1000000 type=""multivalue""", 492670.2976467603, 2.029755 | |
| "old", "querystring/querystring-parse.js", "n=1000000 type=""multivaluemany""", 198429.2341822136, 5.03958 |