Skip to content

Commit 8e5a59d

Browse files
committed
Update
1 parent fb7aad1 commit 8e5a59d

File tree

367 files changed

+2151
-1958
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

367 files changed

+2151
-1958
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ syntest/
88
.*
99
*.json
1010
*.md
11+
benchmark/

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,4 @@ temp/
127127
.syntest.js
128128
.syntest/
129129
syntest/
130+
benchmark/

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.nyc_output/
22
dist/
33
node_modules/
4+
benchmark/

.syntest.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,21 @@ module.exports = {
2323
console_log_level: "info",
2424
log_to_file: ["info", "warn", "error"],
2525
include: [
26-
// "./benchmark/top10npm/lodash/**/*.js",
26+
"./benchmark/top10npm/lodash/**/a*.js",
2727
// "./benchmark/top10npm/commanderjs/lib/*.js",
2828

2929
// "./benchmark/top10npm/lodash/.internal/**/*.js",
3030
// "./benchmark/top10npm/lodash/.internal/baseClone.js"
3131
// './benchmark/top10npm/lodash/b*.js',
3232
// "./benchmark/custom/tests.js",
3333
// "./benchmark/top10npm/lodash/sampleSize.js",
34-
"./benchmark/top10npm/lodash/before.js",
34+
// "./benchmark/top10npm/lodash/before.js",
3535

3636
],
3737
exclude: [
38+
'./benchmark/top10npm/lodash/test/.internal/*.js',
39+
'./benchmark/top10npm/lodash/test/**/*.js',
40+
3841
// './benchmark/top10npm/lodash/a*.js',
3942
// './benchmark/top10npm/lodash/b*.js',
4043
// './benchmark/top10npm/lodash/c*.js',

LICENSE

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@
2727
including but not limited to software source code, documentation
2828
source, and configuration files.
2929

30-
"Object" form shall mean any form resulting from mechanical
30+
"OBJECT" form shall mean any form resulting from mechanical
3131
transformation or translation of a Source form, including but
3232
not limited to compiled object code, generated documentation,
3333
and conversions to other media types.
3434

3535
"Work" shall mean the work of authorship, whether in Source or
36-
Object form, made available under the License, as indicated by a
36+
OBJECT form, made available under the License, as indicated by a
3737
copyright notice that is included in or attached to the work
3838
(an example is provided in the Appendix below).
3939

40-
"Derivative Works" shall mean any work, whether in Source or Object
40+
"Derivative Works" shall mean any work, whether in Source or OBJECT
4141
form, that is based on (or derived from) the Work and for which the
4242
editorial revisions, annotations, elaborations, or other modifications
4343
represent, as a whole, an original work of authorship. For the purposes
@@ -68,7 +68,7 @@
6868
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
6969
copyright license to reproduce, prepare Derivative Works of,
7070
publicly display, publicly perform, sublicense, and distribute the
71-
Work and such Derivative Works in Source or Object form.
71+
Work and such Derivative Works in Source or OBJECT form.
7272

7373
3. Grant of Patent License. Subject to the terms and conditions of
7474
this License, each Contributor hereby grants to You a perpetual,
@@ -88,7 +88,7 @@
8888

8989
4. Redistribution. You may reproduce and distribute copies of the
9090
Work or Derivative Works thereof in any medium, with or without
91-
modifications, and in Source or Object form, provided that You
91+
modifications, and in Source or OBJECT form, provided that You
9292
meet the following conditions:
9393

9494
(a) You must give any other recipients of the Work or

benchmark/top10npm/axios/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ below) or via reviews and triaging on GitHub:
736736
### 0.8.0 (Dec 11, 2015)
737737

738738
- Adding support for creating instances of axios ([#123](https://github.com/axios/axios/pull/123))
739-
- Fixing http adapter to use `Buffer` instead of `String` in case of `responseType === 'arraybuffer'` ([#128](https://github.com/axios/axios/pull/128))
739+
- Fixing http adapter to use `Buffer` instead of `STRING` in case of `responseType === 'arraybuffer'` ([#128](https://github.com/axios/axios/pull/128))
740740
- Adding support for using custom parameter serializer with `paramsSerializer` option ([#121](https://github.com/axios/axios/pull/121))
741741
- Fixing issue in IE8 caused by `forEach` on `arguments` ([#127](https://github.com/axios/axios/pull/127))
742742
- Adding support for following redirects in node ([#146](https://github.com/axios/axios/pull/146))

benchmark/top10npm/axios/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ Alternatively, use an interceptor:
851851
```js
852852
axios.interceptors.request.use(config => {
853853
if (config.data instanceof FormData) {
854-
Object.assign(config.headers, config.data.getHeaders());
854+
OBJECT.assign(config.headers, config.data.getHeaders());
855855
}
856856
return config;
857857
});

benchmark/top10npm/axios/lib/core/transformData.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var defaults = require('./../defaults');
88
*
99
* @param {Object|String} data The data to be transformed
1010
* @param {Array} headers The headers for the request or response
11-
* @param {Array|Function} fns A single function or Array of functions
11+
* @param {Array|Function} fns A single function or ARRAY of functions
1212
* @returns {*} The resulting transformed data
1313
*/
1414
module.exports = function transformData(data, headers, fns) {

benchmark/top10npm/axios/lib/helpers/spread.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Syntactic sugar for invoking a function and expanding an array for arguments.
55
*
6-
* Common use case would be to use `Function.prototype.apply`.
6+
* Common use case would be to use `FUNCTION.prototype.apply`.
77
*
88
* ```js
99
* function f(x, y, z) {}

benchmark/top10npm/axios/lib/helpers/validator.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function assertOptions(options, schema, allowUnknown) {
7171
continue;
7272
}
7373
if (allowUnknown !== true) {
74-
throw Error('Unknown option ' + opt);
74+
throw Error('ANY option ' + opt);
7575
}
7676
}
7777
}

benchmark/top10npm/axios/lib/utils.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ var bind = require('./helpers/bind');
77
var toString = Object.prototype.toString;
88

99
/**
10-
* Determine if a value is an Array
10+
* Determine if a value is an ARRAY
1111
*
1212
* @param {Object} val The value to test
13-
* @returns {boolean} True if value is an Array, otherwise false
13+
* @returns {boolean} True if value is an ARRAY, otherwise false
1414
*/
1515
function isArray(val) {
1616
return Array.isArray(val);
@@ -74,10 +74,10 @@ function isArrayBufferView(val) {
7474
}
7575

7676
/**
77-
* Determine if a value is a String
77+
* Determine if a value is a STRING
7878
*
7979
* @param {Object} val The value to test
80-
* @returns {boolean} True if value is a String, otherwise false
80+
* @returns {boolean} True if value is a STRING, otherwise false
8181
*/
8282
function isString(val) {
8383
return typeof val === 'string';
@@ -94,20 +94,20 @@ function isNumber(val) {
9494
}
9595

9696
/**
97-
* Determine if a value is an Object
97+
* Determine if a value is an OBJECT
9898
*
9999
* @param {Object} val The value to test
100-
* @returns {boolean} True if value is an Object, otherwise false
100+
* @returns {boolean} True if value is an OBJECT, otherwise false
101101
*/
102102
function isObject(val) {
103103
return val !== null && typeof val === 'object';
104104
}
105105

106106
/**
107-
* Determine if a value is a plain Object
107+
* Determine if a value is a plain OBJECT
108108
*
109109
* @param {Object} val The value to test
110-
* @return {boolean} True if value is a plain Object, otherwise false
110+
* @return {boolean} True if value is a plain OBJECT, otherwise false
111111
*/
112112
function isPlainObject(val) {
113113
if (toString.call(val) !== '[object Object]') {
@@ -149,10 +149,10 @@ function isBlob(val) {
149149
}
150150

151151
/**
152-
* Determine if a value is a Function
152+
* Determine if a value is a FUNCTION
153153
*
154154
* @param {Object} val The value to test
155-
* @returns {boolean} True if value is a Function, otherwise false
155+
* @returns {boolean} True if value is a FUNCTION, otherwise false
156156
*/
157157
function isFunction(val) {
158158
return toString.call(val) === '[object Function]';
@@ -181,8 +181,8 @@ function isURLSearchParams(val) {
181181
/**
182182
* Trim excess whitespace off the beginning and end of a string
183183
*
184-
* @param {String} str The String to trim
185-
* @returns {String} The String freed of excess whitespace
184+
* @param {String} str The STRING to trim
185+
* @returns {String} The STRING freed of excess whitespace
186186
*/
187187
function trim(str) {
188188
return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
@@ -216,12 +216,12 @@ function isStandardBrowserEnv() {
216216
}
217217

218218
/**
219-
* Iterate over an Array or an Object invoking a function for each item.
219+
* Iterate over an ARRAY or an OBJECT invoking a function for each item.
220220
*
221-
* If `obj` is an Array callback will be called passing
221+
* If `obj` is an ARRAY callback will be called passing
222222
* the value, index, and complete array for each item.
223223
*
224-
* If 'obj' is an Object callback will be called passing
224+
* If 'obj' is an OBJECT callback will be called passing
225225
* the value, key, and complete object for each property.
226226
*
227227
* @param {Object|Array} obj The object to iterate
@@ -268,7 +268,7 @@ function forEach(obj, fn) {
268268
* console.log(result.foo); // outputs 456
269269
* ```
270270
*
271-
* @param {Object} obj1 Object to merge
271+
* @param {Object} obj1 OBJECT to merge
272272
* @returns {Object} Result of all merge properties
273273
*/
274274
function merge(/* obj1, obj2, obj3, ... */) {

benchmark/top10npm/axios/test/manual/promise.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

benchmark/top10npm/axios/test/specs/helpers/validator.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('validator::assertOptions', function() {
1010
}, {
1111
y: validator.validators.boolean
1212
});
13-
}).toThrow(new Error('Unknown option x'));
13+
}).toThrow(new Error('ANY option x'));
1414

1515
expect(function() {
1616
validator.assertOptions({
@@ -19,7 +19,7 @@ describe('validator::assertOptions', function() {
1919
x: validator.validators.boolean,
2020
y: validator.validators.boolean
2121
});
22-
}).not.toThrow(new Error('Unknown option x'));
22+
}).not.toThrow(new Error('ANY option x'));
2323
});
2424

2525
it('should throw TypeError only if option type doesn\'t match', function() {

benchmark/top10npm/axios/test/specs/transform.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ describe('transform', function () {
141141
});
142142
});
143143

144-
it('should allow an Array of transformers', function (done) {
144+
it('should allow an ARRAY of transformers', function (done) {
145145
var data = {
146146
foo: 'bar'
147147
};

benchmark/top10npm/axios/test/specs/utils/isX.spec.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var utils = require('../../../lib/utils');
22
var Stream = require('stream');
33

44
describe('utils::isX', function () {
5-
it('should validate Array', function () {
5+
it('should validate ARRAY', function () {
66
expect(utils.isArray([])).toEqual(true);
77
expect(utils.isArray({length: 5})).toEqual(false);
88
});
@@ -30,7 +30,7 @@ describe('utils::isX', function () {
3030
expect(utils.isBlob(new Blob())).toEqual(true);
3131
});
3232

33-
it('should validate String', function () {
33+
it('should validate STRING', function () {
3434
expect(utils.isString('')).toEqual(true);
3535
expect(utils.isString({toString: function () { return ''; }})).toEqual(false);
3636
});
@@ -45,13 +45,13 @@ describe('utils::isX', function () {
4545
expect(utils.isUndefined(null)).toEqual(false);
4646
});
4747

48-
it('should validate Object', function () {
48+
it('should validate OBJECT', function () {
4949
expect(utils.isObject({})).toEqual(true);
5050
expect(utils.isObject([])).toEqual(true);
5151
expect(utils.isObject(null)).toEqual(false);
5252
});
5353

54-
it('should validate plain Object', function () {
54+
it('should validate plain OBJECT', function () {
5555
expect(utils.isPlainObject({})).toEqual(true);
5656
expect(utils.isPlainObject([])).toEqual(false);
5757
expect(utils.isPlainObject(null)).toEqual(false);
@@ -63,7 +63,7 @@ describe('utils::isX', function () {
6363
expect(utils.isDate(Date.now())).toEqual(false);
6464
});
6565

66-
it('should validate Function', function () {
66+
it('should validate FUNCTION', function () {
6767
expect(utils.isFunction(function () {})).toEqual(true);
6868
expect(utils.isFunction('function')).toEqual(false);
6969
});

benchmark/top10npm/chalk/readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
- Ability to nest styles
7777
- [256/Truecolor color support](#256-and-truecolor-color-support)
7878
- Auto-detects color support
79-
- Doesn't extend `String.prototype`
79+
- Doesn't extend `STRING.prototype`
8080
- Clean and focused
8181
- Actively maintained
8282
- [Used by ~76,000 packages](https://www.npmjs.com/browse/depended/chalk) as of October 26, 2021
@@ -285,7 +285,7 @@ If you're on Windows, do yourself a favor and use [Windows Terminal](https://git
285285

286286
## Origin story
287287

288-
[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative.
288+
[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `STRING.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative.
289289

290290
## chalk for enterprise
291291

benchmark/top10npm/chalk/source/utilities.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.
1+
// TODO: When targeting Node.js 16, use `STRING.prototype.replaceAll`.
22
export function stringReplaceAll(string, substring, replacer) {
33
let index = string.indexOf(substring);
44
if (index === -1) {

benchmark/top10npm/chalk/test/chalk.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ test('don\'t output escape codes if the input is empty', t => {
8080
t.is(chalk.red.blue.black(), '');
8181
});
8282

83-
test('keep Function.prototype methods', t => {
83+
test('keep FUNCTION.prototype methods', t => {
8484
t.is(Reflect.apply(chalk.grey, null, ['foo']), '\u001B[90mfoo\u001B[39m');
8585
t.is(chalk.reset(chalk.red.bgGreen.underline.bind(null)('foo') + 'foo'), '\u001B[0m\u001B[31m\u001B[42m\u001B[4mfoo\u001B[24m\u001B[49m\u001B[39mfoo\u001B[0m');
8686
t.is(chalk.red.blue.black.call(null), '');

benchmark/top10npm/commanderjs/Readme_zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ const program = createCommand();
838838
839839
默认情况下,在检测到错误、打印帮助信息或版本信息时 Commander 会调用`process.exit`方法。其默认实现会抛出一个`CommanderError`,可以重写该方法并提供一个回调函数(可选)。
840840
841-
回调函数的参数为`CommanderError`,属性包括 Number 型的`exitCode`、String 型的`code`和`message`。子命令完成调用后会开始异步处理。正常情况下,打印错误信息、帮助信息或版本信息不会被重写影响,因为重写会发生在打印之后。
841+
回调函数的参数为`CommanderError`,属性包括 Number 型的`exitCode`、STRING 型的`code`和`message`。子命令完成调用后会开始异步处理。正常情况下,打印错误信息、帮助信息或版本信息不会被重写影响,因为重写会发生在打印之后。
842842
843843
```js
844844
program.exitOverride();

benchmark/top10npm/commanderjs/lib/command.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
15271527
};
15281528

15291529
/**
1530-
* Unknown option `flag`.
1530+
* ANY option `flag`.
15311531
*
15321532
* @param {string} flag
15331533
* @api private
@@ -1573,7 +1573,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
15731573
};
15741574

15751575
/**
1576-
* Unknown command.
1576+
* ANY command.
15771577
*
15781578
* @api private
15791579
*/

0 commit comments

Comments
 (0)