Jay.M.Hu

Results 106 comments of Jay.M.Hu

Some error info: ``` ERROR in ./src/modules/nk-demo/index.ts Module build failed: Error: Final loader didn't return a Buffer or String at D:\TeamCode\newkit\node_modules\webpack\lib\NormalModule.js:151:64 at D:\TeamCode\newkit\node_modules\loader-runner\lib\LoaderRunner.js:365:3 at iterateNormalLoaders (D:\TeamCode\newkit\node_modules\loader-runner\lib\LoaderRunner.js:206:10) at iterateNormalLoaders (D:\TeamCode\newkit\node_modules\loader-runner\lib\LoaderRunner.js:213:10) at...

set content ``` export {}; ``` to the empty xx.d.ts, will shy away this problem.

@claudiuconstantin some d.ts is empty will throw the messages.

根据URL参数条件,来判断返回体: id [下拉: 大于,小于,等于,不等于] [value] ,配置一个返回值

First version: ```js function sendRequest(urls, max, callback) { const len = urls.length; let currentIdx = Math.min(len, max); let counter = 0; function _done() { counter += 1; // All done....

Usage: ```js var urls = new Array(24).fill(true).map((x, i) => `https://github.com/hstarorg/HstarDoc/issues/${i + 1}`); sendRequest(urls, 5, function() { console.log('done'); }); ```

Second version: ```js function sendRequest(urls, max, callback) { const len = urls.length; let currentIdx = Math.min(len, max); let counter = 0; function _done() { counter += 1; // All done....

Another version: ```js function sendRequest(urls, max, callback) { const len = urls.length; let idx = 0; let counter = 0; function _request() { // 有请求,有通道 while (idx < len &&...

### 测试结果1(100000个元素。注意,多次执行测试结果会不一样,但能看出大概性能) ```js // Prepare var ARRAY_LENGTH = 100000; var MAX_VALUE = ARRAY_LENGTH * 10; var arr = new Array(ARRAY_LENGTH).fill(0).map(x => Math.floor(Math.random() * MAX_VALUE)); // Test quick sort console.time('quick sort');...

### 测试结果2(10000个元素。注意,多次执行测试结果会不一样,但能看出大概性能) ```js // Prepare var ARRAY_LENGTH = 10000; var MAX_VALUE = ARRAY_LENGTH * 10; var arr = new Array(ARRAY_LENGTH).fill(0).map(x => Math.floor(Math.random() * MAX_VALUE)); // Test quick sort console.time('quick sort');...