Tracking de l'application VApp (IHM du jeu)
This commit is contained in:
21
VApp/node_modules/array-flatten/LICENSE
generated
vendored
Normal file
21
VApp/node_modules/array-flatten/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
43
VApp/node_modules/array-flatten/README.md
generated
vendored
Normal file
43
VApp/node_modules/array-flatten/README.md
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
# Array Flatten
|
||||
|
||||
[![NPM version][npm-image]][npm-url]
|
||||
[![NPM downloads][downloads-image]][downloads-url]
|
||||
[![Build status][travis-image]][travis-url]
|
||||
[![Test coverage][coveralls-image]][coveralls-url]
|
||||
[![Bundle size][bundlephobia-image]][bundlephobia-url]
|
||||
|
||||
> Flatten nested arrays.
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
npm install array-flatten --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import { flatten } from "array-flatten";
|
||||
|
||||
flatten([1, [2, [3, [4, [5], 6], 7], 8], 9]);
|
||||
//=> [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
|
||||
(function() {
|
||||
flatten(arguments); //=> [1, 2, 3]
|
||||
})(1, [2, 3]);
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/array-flatten.svg?style=flat
|
||||
[npm-url]: https://npmjs.org/package/array-flatten
|
||||
[downloads-image]: https://img.shields.io/npm/dm/array-flatten.svg?style=flat
|
||||
[downloads-url]: https://npmjs.org/package/array-flatten
|
||||
[travis-image]: https://img.shields.io/travis/blakeembrey/array-flatten.svg?style=flat
|
||||
[travis-url]: https://travis-ci.org/blakeembrey/array-flatten
|
||||
[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/array-flatten.svg?style=flat
|
||||
[coveralls-url]: https://coveralls.io/r/blakeembrey/array-flatten?branch=master
|
||||
[bundlephobia-image]: https://img.shields.io/bundlephobia/minzip/array-flatten.svg
|
||||
[bundlephobia-url]: https://bundlephobia.com/result?p=array-flatten
|
23
VApp/node_modules/array-flatten/dist.es2015/index.js
generated
vendored
Normal file
23
VApp/node_modules/array-flatten/dist.es2015/index.js
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Flatten an array indefinitely.
|
||||
*/
|
||||
export function flatten(array) {
|
||||
var result = [];
|
||||
$flatten(array, result);
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Internal flatten function recursively passes `result`.
|
||||
*/
|
||||
function $flatten(array, result) {
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
var value = array[i];
|
||||
if (Array.isArray(value)) {
|
||||
$flatten(value, result);
|
||||
}
|
||||
else {
|
||||
result.push(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
1
VApp/node_modules/array-flatten/dist.es2015/index.js.map
generated
vendored
Normal file
1
VApp/node_modules/array-flatten/dist.es2015/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,MAAM,UAAU,OAAO,CAA2B,KAAQ;IACxD,IAAM,MAAM,GAAiB,EAAE,CAAC;IAChC,QAAQ,CAAI,KAAK,EAAE,MAAM,CAAC,CAAC;IAC3B,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,SAAS,QAAQ,CACf,KAAQ,EACR,MAAoB;IAEpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,IAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAEvB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACxB,QAAQ,CAAC,KAAY,EAAE,MAAM,CAAC,CAAC;SAChC;aAAM;YACL,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACpB;KACF;AACH,CAAC","sourcesContent":["/**\n * Pick the value from an array.\n */\nexport type PickValue<T> = T extends ReadonlyArray<any>\n ? {\n [K in Extract<keyof T, number>]: PickValue<T[K]>;\n }[number]\n : T;\n\n/**\n * Flatten an `ArrayLike` object in TypeScript.\n */\nexport type FlatArray<T extends ArrayLike<any>> = Array<PickValue<T[number]>>;\n\n/**\n * Flatten an array indefinitely.\n */\nexport function flatten<T extends ArrayLike<any>>(array: T): FlatArray<T> {\n const result: FlatArray<T> = [];\n $flatten<T>(array, result);\n return result;\n}\n\n/**\n * Internal flatten function recursively passes `result`.\n */\nfunction $flatten<T extends ArrayLike<any>>(\n array: T,\n result: FlatArray<T>\n): void {\n for (let i = 0; i < array.length; i++) {\n const value = array[i];\n\n if (Array.isArray(value)) {\n $flatten(value as any, result);\n } else {\n result.push(value);\n }\n }\n}\n"]}
|
42
VApp/node_modules/array-flatten/dist.es2015/index.spec.js
generated
vendored
Normal file
42
VApp/node_modules/array-flatten/dist.es2015/index.spec.js
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
import { expectType } from "ts-expect";
|
||||
import { flatten } from "./index";
|
||||
describe("flatten", function () {
|
||||
it("should flatten an array", function () {
|
||||
var result = flatten([1, [2, [3, [4, [5]]], 6, [[7], 8], 9], 10]);
|
||||
expectType(result);
|
||||
expect(result).toStrictEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
||||
});
|
||||
it("should work with array-like", function () {
|
||||
var result = flatten("test");
|
||||
expectType(result);
|
||||
expect(result).toStrictEqual(["t", "e", "s", "t"]);
|
||||
});
|
||||
it("should work with readonly array", function () {
|
||||
var input = [1, [2, [3, [4]]]];
|
||||
var result = flatten(input);
|
||||
expectType(result);
|
||||
expect(result).toStrictEqual([1, 2, 3, 4]);
|
||||
});
|
||||
it("should work with arguments", function () {
|
||||
var input = (function () {
|
||||
return arguments;
|
||||
})();
|
||||
var result = flatten(input);
|
||||
expectType(result);
|
||||
expect(result).toStrictEqual([]);
|
||||
});
|
||||
it("should work with mixed types", function () {
|
||||
var fn = function (x) { return x; };
|
||||
var input = [1, ["test", [fn, [true]]]];
|
||||
var result = flatten(input);
|
||||
expectType(result);
|
||||
expect(result).toStrictEqual([1, "test", fn, true]);
|
||||
});
|
||||
it("should work with tuples", function () {
|
||||
var input = [1, [1, 2], [3]];
|
||||
var result = flatten(input);
|
||||
expectType(result);
|
||||
expect(result).toStrictEqual([1, 1, 2, 3]);
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=index.spec.js.map
|
1
VApp/node_modules/array-flatten/dist.es2015/index.spec.js.map
generated
vendored
Normal file
1
VApp/node_modules/array-flatten/dist.es2015/index.spec.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.spec.js","sourceRoot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C,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expectType } from \"ts-expect\";\nimport { flatten } from \"./index\";\n\ndescribe(\"flatten\", () => {\n it(\"should flatten an array\", () => {\n const result = flatten([1, [2, [3, [4, [5]]], 6, [[7], 8], 9], 10]);\n\n expectType<number[]>(result);\n\n expect(result).toStrictEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);\n });\n\n it(\"should work with array-like\", () => {\n const result = flatten(\"test\");\n\n expectType<string[]>(result);\n\n expect(result).toStrictEqual([\"t\", \"e\", \"s\", \"t\"]);\n });\n\n it(\"should work with readonly array\", () => {\n const input = [1, [2, [3, [4]]]] as const;\n const result = flatten(input);\n\n expectType<(1 | 2 | 3 | 4)[]>(result);\n\n expect(result).toStrictEqual([1, 2, 3, 4]);\n });\n\n it(\"should work with arguments\", () => {\n const input = (function() {\n return arguments;\n })();\n const result = flatten(input);\n\n expectType<any[]>(result);\n\n expect(result).toStrictEqual([]);\n });\n\n it(\"should work with mixed types\", () => {\n const fn = (x: string) => x;\n const input = [1, [\"test\", [fn, [true]]]];\n const result = flatten(input);\n\n expectType<(number | string | boolean | typeof fn)[]>(result);\n\n expect(result).toStrictEqual([1, \"test\", fn, true]);\n });\n\n it(\"should work with tuples\", () => {\n const input: [number, [number, number], [number]] = [1, [1, 2], [3]];\n const result = flatten(input);\n\n expectType<number[]>(result);\n\n expect(result).toStrictEqual([1, 1, 2, 3]);\n });\n});\n"]}
|
14
VApp/node_modules/array-flatten/dist/index.d.ts
generated
vendored
Normal file
14
VApp/node_modules/array-flatten/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Pick the value from an array.
|
||||
*/
|
||||
export declare type PickValue<T> = T extends ReadonlyArray<any> ? {
|
||||
[K in Extract<keyof T, number>]: PickValue<T[K]>;
|
||||
}[number] : T;
|
||||
/**
|
||||
* Flatten an `ArrayLike` object in TypeScript.
|
||||
*/
|
||||
export declare type FlatArray<T extends ArrayLike<any>> = Array<PickValue<T[number]>>;
|
||||
/**
|
||||
* Flatten an array indefinitely.
|
||||
*/
|
||||
export declare function flatten<T extends ArrayLike<any>>(array: T): FlatArray<T>;
|
26
VApp/node_modules/array-flatten/dist/index.js
generated
vendored
Normal file
26
VApp/node_modules/array-flatten/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
/**
|
||||
* Flatten an array indefinitely.
|
||||
*/
|
||||
function flatten(array) {
|
||||
var result = [];
|
||||
$flatten(array, result);
|
||||
return result;
|
||||
}
|
||||
exports.flatten = flatten;
|
||||
/**
|
||||
* Internal flatten function recursively passes `result`.
|
||||
*/
|
||||
function $flatten(array, result) {
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
var value = array[i];
|
||||
if (Array.isArray(value)) {
|
||||
$flatten(value, result);
|
||||
}
|
||||
else {
|
||||
result.push(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
1
VApp/node_modules/array-flatten/dist/index.js.map
generated
vendored
Normal file
1
VApp/node_modules/array-flatten/dist/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAcA;;GAEG;AACH,SAAgB,OAAO,CAA2B,KAAQ;IACxD,IAAM,MAAM,GAAiB,EAAE,CAAC;IAChC,QAAQ,CAAI,KAAK,EAAE,MAAM,CAAC,CAAC;IAC3B,OAAO,MAAM,CAAC;AAChB,CAAC;AAJD,0BAIC;AAED;;GAEG;AACH,SAAS,QAAQ,CACf,KAAQ,EACR,MAAoB;IAEpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,IAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAEvB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACxB,QAAQ,CAAC,KAAY,EAAE,MAAM,CAAC,CAAC;SAChC;aAAM;YACL,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACpB;KACF;AACH,CAAC","sourcesContent":["/**\n * Pick the value from an array.\n */\nexport type PickValue<T> = T extends ReadonlyArray<any>\n ? {\n [K in Extract<keyof T, number>]: PickValue<T[K]>;\n }[number]\n : T;\n\n/**\n * Flatten an `ArrayLike` object in TypeScript.\n */\nexport type FlatArray<T extends ArrayLike<any>> = Array<PickValue<T[number]>>;\n\n/**\n * Flatten an array indefinitely.\n */\nexport function flatten<T extends ArrayLike<any>>(array: T): FlatArray<T> {\n const result: FlatArray<T> = [];\n $flatten<T>(array, result);\n return result;\n}\n\n/**\n * Internal flatten function recursively passes `result`.\n */\nfunction $flatten<T extends ArrayLike<any>>(\n array: T,\n result: FlatArray<T>\n): void {\n for (let i = 0; i < array.length; i++) {\n const value = array[i];\n\n if (Array.isArray(value)) {\n $flatten(value as any, result);\n } else {\n result.push(value);\n }\n }\n}\n"]}
|
1
VApp/node_modules/array-flatten/dist/index.spec.d.ts
generated
vendored
Normal file
1
VApp/node_modules/array-flatten/dist/index.spec.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export {};
|
44
VApp/node_modules/array-flatten/dist/index.spec.js
generated
vendored
Normal file
44
VApp/node_modules/array-flatten/dist/index.spec.js
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var ts_expect_1 = require("ts-expect");
|
||||
var index_1 = require("./index");
|
||||
describe("flatten", function () {
|
||||
it("should flatten an array", function () {
|
||||
var result = index_1.flatten([1, [2, [3, [4, [5]]], 6, [[7], 8], 9], 10]);
|
||||
ts_expect_1.expectType(result);
|
||||
expect(result).toStrictEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
||||
});
|
||||
it("should work with array-like", function () {
|
||||
var result = index_1.flatten("test");
|
||||
ts_expect_1.expectType(result);
|
||||
expect(result).toStrictEqual(["t", "e", "s", "t"]);
|
||||
});
|
||||
it("should work with readonly array", function () {
|
||||
var input = [1, [2, [3, [4]]]];
|
||||
var result = index_1.flatten(input);
|
||||
ts_expect_1.expectType(result);
|
||||
expect(result).toStrictEqual([1, 2, 3, 4]);
|
||||
});
|
||||
it("should work with arguments", function () {
|
||||
var input = (function () {
|
||||
return arguments;
|
||||
})();
|
||||
var result = index_1.flatten(input);
|
||||
ts_expect_1.expectType(result);
|
||||
expect(result).toStrictEqual([]);
|
||||
});
|
||||
it("should work with mixed types", function () {
|
||||
var fn = function (x) { return x; };
|
||||
var input = [1, ["test", [fn, [true]]]];
|
||||
var result = index_1.flatten(input);
|
||||
ts_expect_1.expectType(result);
|
||||
expect(result).toStrictEqual([1, "test", fn, true]);
|
||||
});
|
||||
it("should work with tuples", function () {
|
||||
var input = [1, [1, 2], [3]];
|
||||
var result = index_1.flatten(input);
|
||||
ts_expect_1.expectType(result);
|
||||
expect(result).toStrictEqual([1, 1, 2, 3]);
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=index.spec.js.map
|
1
VApp/node_modules/array-flatten/dist/index.spec.js.map
generated
vendored
Normal file
1
VApp/node_modules/array-flatten/dist/index.spec.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../src/index.spec.ts"],"names":[],"mappings":";;AAAA,uCAAuC;AACvC,iCAAkC;AAElC,QAAQ,CAAC,SAAS,EAAE;IAClB,EAAE,CAAC,yBAAyB,EAAE;QAC5B,IAAM,MAAM,GAAG,eAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAA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AEH,EAAE,CAAC,8BAA8B,EAAE;QACjC,IAAM,EAAE,GAAG,UAAC,CAAS,IAAK,OAAA,CAAC,EAAD,CAAC,CAAC;QAC5B,IAAM,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,IAAM,MAAM,GAAG,eAAO,CAAC,KAAK,CAAC,CAAC;QAE9B,sBAAU,CAA4C,MAAM,CAAC,CAAC;QAE9D,MAAM,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yBAAyB,EAAE;QAC5B,IAAM,KAAK,GAAyC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACrE,IAAM,MAAM,GAAG,eAAO,CAAC,KAAK,CAAC,CAAC;QAE9B,sBAAU,CAAW,MAAM,CAAC,CAAC;QAE7B,MAAM,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expectType } from \"ts-expect\";\nimport { flatten } from \"./index\";\n\ndescribe(\"flatten\", () => {\n it(\"should flatten an array\", () => {\n const result = flatten([1, [2, [3, [4, [5]]], 6, [[7], 8], 9], 10]);\n\n expectType<number[]>(result);\n\n expect(result).toStrictEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);\n });\n\n it(\"should work with array-like\", () => {\n const result = flatten(\"test\");\n\n expectType<string[]>(result);\n\n expect(result).toStrictEqual([\"t\", \"e\", \"s\", \"t\"]);\n });\n\n it(\"should work with readonly array\", () => {\n const input = [1, [2, [3, [4]]]] as const;\n const result = flatten(input);\n\n expectType<(1 | 2 | 3 | 4)[]>(result);\n\n expect(result).toStrictEqual([1, 2, 3, 4]);\n });\n\n it(\"should work with arguments\", () => {\n const input = (function() {\n return arguments;\n })();\n const result = flatten(input);\n\n expectType<any[]>(result);\n\n expect(result).toStrictEqual([]);\n });\n\n it(\"should work with mixed types\", () => {\n const fn = (x: string) => x;\n const input = [1, [\"test\", [fn, [true]]]];\n const result = flatten(input);\n\n expectType<(number | string | boolean | typeof fn)[]>(result);\n\n expect(result).toStrictEqual([1, \"test\", fn, true]);\n });\n\n it(\"should work with tuples\", () => {\n const input: [number, [number, number], [number]] = [1, [1, 2], [3]];\n const result = flatten(input);\n\n expectType<number[]>(result);\n\n expect(result).toStrictEqual([1, 1, 2, 3]);\n });\n});\n"]}
|
101
VApp/node_modules/array-flatten/package.json
generated
vendored
Normal file
101
VApp/node_modules/array-flatten/package.json
generated
vendored
Normal file
@ -0,0 +1,101 @@
|
||||
{
|
||||
"name": "array-flatten",
|
||||
"version": "3.0.0",
|
||||
"description": "Flatten nested arrays",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"module": "dist.es2015/index.js",
|
||||
"sideEffects": false,
|
||||
"jsnext:main": "dist.es2015/index.js",
|
||||
"files": [
|
||||
"dist/",
|
||||
"dist.es2015/",
|
||||
"LICENSE"
|
||||
],
|
||||
"scripts": {
|
||||
"prettier": "prettier --write",
|
||||
"lint": "tslint \"src/**/*\" --project tsconfig.json",
|
||||
"format": "npm run prettier -- \"{.,src/**,benchmark/**}/*.{js,ts}\"",
|
||||
"build": "rimraf dist/ dist.es2015/ && tsc && tsc -P tsconfig.es2015.json",
|
||||
"benchmark": "node benchmark",
|
||||
"specs": "jest --coverage",
|
||||
"test": "npm run build && npm run lint && npm run specs && npm run size",
|
||||
"size": "size-limit",
|
||||
"prepare": "npm run build"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/blakeembrey/array-flatten.git"
|
||||
},
|
||||
"keywords": [
|
||||
"array",
|
||||
"flatten",
|
||||
"arguments",
|
||||
"depth",
|
||||
"fast",
|
||||
"for"
|
||||
],
|
||||
"author": {
|
||||
"name": "Blake Embrey",
|
||||
"email": "hello@blakeembrey.com",
|
||||
"url": "http://blakeembrey.me"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/blakeembrey/array-flatten/issues"
|
||||
},
|
||||
"homepage": "https://github.com/blakeembrey/array-flatten",
|
||||
"size-limit": [
|
||||
{
|
||||
"path": "dist/index.js",
|
||||
"limit": "100 B"
|
||||
}
|
||||
],
|
||||
"jest": {
|
||||
"roots": [
|
||||
"<rootDir>/src/"
|
||||
],
|
||||
"transform": {
|
||||
"\\.tsx?$": "ts-jest"
|
||||
},
|
||||
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$",
|
||||
"moduleFileExtensions": [
|
||||
"ts",
|
||||
"tsx",
|
||||
"js",
|
||||
"jsx",
|
||||
"json",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,json,css,md}": [
|
||||
"npm run prettier",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@size-limit/preset-small-lib": "^2.2.1",
|
||||
"@types/jest": "^24.0.23",
|
||||
"@types/node": "^12.12.11",
|
||||
"benchmarked": "^2.0.0",
|
||||
"husky": "^3.1.0",
|
||||
"jest": "^24.9.0",
|
||||
"lint-staged": "^9.4.3",
|
||||
"prettier": "^1.19.1",
|
||||
"ts-expect": "^1.1.0",
|
||||
"ts-jest": "^24.1.0",
|
||||
"tslint": "^5.20.1",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"tslint-config-standard": "^9.0.0",
|
||||
"typescript": "^3.7.2"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user