first commit
This commit is contained in:
15
build/node_modules/filled-array/index.js
generated
vendored
Normal file
15
build/node_modules/filled-array/index.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
module.exports = function (item, n) {
|
||||
var ret = new Array(n);
|
||||
var isFn = typeof item === 'function';
|
||||
|
||||
if (!isFn && typeof ret.fill === 'function') {
|
||||
return ret.fill(item);
|
||||
}
|
||||
|
||||
for (var i = 0; i < n; i++) {
|
||||
ret[i] = isFn ? item(i, n, ret) : item;
|
||||
}
|
||||
|
||||
return ret;
|
||||
};
|
||||
21
build/node_modules/filled-array/license
generated
vendored
Normal file
21
build/node_modules/filled-array/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.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.
|
||||
69
build/node_modules/filled-array/package.json
generated
vendored
Normal file
69
build/node_modules/filled-array/package.json
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"_from": "filled-array@^1.0.0",
|
||||
"_id": "filled-array@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-w8T2xmO5I0WamqKZEtLQMfFQf4Q=",
|
||||
"_location": "/filled-array",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "filled-array@^1.0.0",
|
||||
"name": "filled-array",
|
||||
"escapedName": "filled-array",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/boxen"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/filled-array/-/filled-array-1.1.0.tgz",
|
||||
"_shasum": "c3c4f6c663b923459a9aa29912d2d031f1507f84",
|
||||
"_spec": "filled-array@^1.0.0",
|
||||
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build/node_modules/boxen",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/filled-array/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Returns an array filled with the specified input",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/filled-array#readme",
|
||||
"keywords": [
|
||||
"array",
|
||||
"elements",
|
||||
"el",
|
||||
"filled",
|
||||
"repeat",
|
||||
"repeating",
|
||||
"string",
|
||||
"str",
|
||||
"text",
|
||||
"fill"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "filled-array",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/filled-array.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.1.0"
|
||||
}
|
||||
52
build/node_modules/filled-array/readme.md
generated
vendored
Normal file
52
build/node_modules/filled-array/readme.md
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# filled-array [](https://travis-ci.org/sindresorhus/filled-array)
|
||||
|
||||
> Returns an array filled with the specified input
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save filled-array
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const filledArray = require('filled-array');
|
||||
|
||||
filledArray('x', 3);
|
||||
//=> ['x', 'x', 'x']
|
||||
|
||||
filledArray(0, 3);
|
||||
//=> [0, 0, 0]
|
||||
|
||||
filledArray(i => {
|
||||
return (++i % 3 ? '' : 'Fizz') + (i % 5 ? '' : 'Buzz') || i;
|
||||
}, 15);
|
||||
//=> [1, 2, 'Fizz', 4, 'Buzz', 'Fizz', 7, 8, 'Fizz', 'Buzz', 11, 'Fizz', 13, 14, 'FizzBuzz']
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### filledArray(filler, count)
|
||||
|
||||
#### filler
|
||||
|
||||
Type: Any
|
||||
|
||||
Value to fill the array with.
|
||||
|
||||
You can pass a function to generate the array items dynamically. The function is expected to return the value for each iteration and will be called with the following arguments: index, the count you passed in, and the filled array thus far.
|
||||
|
||||
#### count
|
||||
|
||||
Type: `number`
|
||||
|
||||
Number of items to fill the array with.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
Reference in New Issue
Block a user