replace jest with ava
This commit is contained in:
parent
27cc8b23fe
commit
0347b72305
11775 changed files with 84546 additions and 1440575 deletions
20
node_modules/equal-length/index.js
generated
vendored
Normal file
20
node_modules/equal-length/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = input => {
|
||||
if (typeof input !== 'string') {
|
||||
throw new TypeError(`Expected input to be a string, got ${typeof input}`);
|
||||
}
|
||||
|
||||
const lines = input.split('\n');
|
||||
const maxLength = Math.max.apply(null, lines.map(line => line.length));
|
||||
|
||||
return lines
|
||||
.map(line => {
|
||||
if (line.length < maxLength) {
|
||||
line += ' '.repeat(maxLength - line.length);
|
||||
}
|
||||
|
||||
return line;
|
||||
})
|
||||
.join('\n');
|
||||
};
|
||||
21
node_modules/equal-length/license
generated
vendored
Normal file
21
node_modules/equal-length/license
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Vadim Demedes <vdemedes@gmail.com> (github.com/vadimdemedes)
|
||||
|
||||
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.
|
||||
32
node_modules/equal-length/package.json
generated
vendored
Normal file
32
node_modules/equal-length/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"name": "equal-length",
|
||||
"version": "1.0.1",
|
||||
"description": "Extend lines to equal length",
|
||||
"license": "MIT",
|
||||
"repository": "vadimdemedes/equal-length",
|
||||
"author": {
|
||||
"name": "vdemedes",
|
||||
"email": "vdemedes@gmail.com",
|
||||
"url": "github.com/vadimdemedes"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"equal",
|
||||
"line"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^0.17.0",
|
||||
"xo": "^0.17.1"
|
||||
},
|
||||
"xo": {
|
||||
"esnext": true
|
||||
}
|
||||
}
|
||||
44
node_modules/equal-length/readme.md
generated
vendored
Normal file
44
node_modules/equal-length/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# equal-length [](https://travis-ci.org/vadimdemedes/equal-length)
|
||||
|
||||
> Extend lines to equal length
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save equal-length
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
*.join() and .split() are used only to demo line length*
|
||||
|
||||
```js
|
||||
const equalLength = require('equal-length');
|
||||
|
||||
equalLength([
|
||||
'abc',
|
||||
'a'
|
||||
].join('\n')).split('\n');
|
||||
// => [
|
||||
// 'abc',
|
||||
// 'a '
|
||||
// ]
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### equalLength(input)
|
||||
|
||||
#### input
|
||||
|
||||
Type: `string`
|
||||
|
||||
Multiline string.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Vadim Demedes](https://github.com/vadimdemedes)
|
||||
Loading…
Add table
Add a link
Reference in a new issue