replace jest with ava

This commit is contained in:
Robert Brignull 2020-05-04 18:50:13 +01:00
parent 27cc8b23fe
commit 0347b72305
11775 changed files with 84546 additions and 1440575 deletions

19
node_modules/chunkd/LICENSE generated vendored Normal file
View file

@ -0,0 +1,19 @@
Copyright (c) 2018-present Jamie Kyle <me@thejameskyle.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.

19
node_modules/chunkd/README.md generated vendored Normal file
View file

@ -0,0 +1,19 @@
# chunkd
> Get a chunk of an array based on the total number of chunks and current index
## Install
```sh
yarn add [--dev] chunkd
```
## Example
```js
const chunkd = require("chunkd")
chunkd([1, 2, 3, 4], 0, 3) // [1, 2]
chunkd([1, 2, 3, 4], 1, 3) // [3]
chunkd([1, 2, 3, 4], 2, 3) // [4]
```

2
node_modules/chunkd/dist/chunkd.d.ts generated vendored Normal file
View file

@ -0,0 +1,2 @@
export default function chunkd<T>(array: T[], index: number, total: number): T[];
//# sourceMappingURL=chunkd.d.ts.map

1
node_modules/chunkd/dist/chunkd.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"chunkd.d.ts","sourceRoot":"","sources":["../src/chunkd.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,CAAC,EAC/B,KAAK,EAAE,CAAC,EAAE,EACV,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACX,CAAC,EAAE,CAQL"}

13
node_modules/chunkd/dist/chunkd.js generated vendored Normal file
View file

@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function chunkd(array, index, total) {
let length = array.length;
let size = Math.floor(length / total);
let remainder = length % total;
let offset = Math.min(index, remainder) + index * size;
let chunk = size + (index < remainder ? 1 : 0);
return array.slice(offset, offset + chunk);
}
exports.default = chunkd;
module.exports = chunkd;
//# sourceMappingURL=chunkd.js.map

1
node_modules/chunkd/dist/chunkd.js.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"chunkd.js","sourceRoot":"","sources":["../src/chunkd.ts"],"names":[],"mappings":";;AAAA,SAAwB,MAAM,CAC7B,KAAU,EACV,KAAa,EACb,KAAa;IAEb,IAAI,MAAM,GAAG,KAAK,CAAC,MAAM,CAAA;IACzB,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,CAAA;IACrC,IAAI,SAAS,GAAG,MAAM,GAAG,KAAK,CAAA;IAC9B,IAAI,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,GAAG,KAAK,GAAG,IAAI,CAAA;IACtD,IAAI,KAAK,GAAG,IAAI,GAAG,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAE9C,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,CAAA;AAC3C,CAAC;AAZD,yBAYC;AAED,MAAM,CAAC,OAAO,GAAG,MAAM,CAAA"}

54
node_modules/chunkd/package.json generated vendored Normal file
View file

@ -0,0 +1,54 @@
{
"name": "chunkd",
"version": "2.0.1",
"description": "Get a chunk of an array based on the total number of chunks and current index",
"main": "dist/chunkd.js",
"repository": "jamiebuilds/chunkd",
"author": "Jamie Kyle <me@thejameskyle.com>",
"license": "MIT",
"keywords": [
"util",
"chunk",
"index",
"total"
],
"files": [
"dist"
],
"scripts": {
"check:typescript": "tsc --noEmit",
"check:prettier": "prettier --check '**'",
"build": "rm -rf dist && tsc",
"format": "prettier --write '**'",
"test": "ava",
"prepublishOnly": "npm run -s build"
},
"devDependencies": {
"ava": "^2.4.0",
"husky": "^3.1.0",
"lint-staged": "^9.4.3",
"prettier": "^1.19.1",
"ts-node": "^8.5.2",
"typescript": "^3.7.2"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*": [
"prettier --write",
"git add"
]
},
"ava": {
"compileEnhancements": false,
"extensions": [
"ts"
],
"require": [
"ts-node/register"
]
}
}