Template Upload
This commit is contained in:
15
node_modules/filled-array/index.js
generated
vendored
Normal file
15
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
node_modules/filled-array/license
generated
vendored
Normal file
21
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.
|
92
node_modules/filled-array/package.json
generated
vendored
Normal file
92
node_modules/filled-array/package.json
generated
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"filled-array@^1.0.0",
|
||||
"C:\\Users\\x2mjbyrn\\Source\\Repos\\Skeleton\\node_modules\\boxen"
|
||||
]
|
||||
],
|
||||
"_from": "filled-array@>=1.0.0-0 <2.0.0-0",
|
||||
"_id": "filled-array@1.1.0",
|
||||
"_inCache": true,
|
||||
"_location": "/filled-array",
|
||||
"_nodeVersion": "4.2.1",
|
||||
"_npmUser": {
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"name": "sindresorhus"
|
||||
},
|
||||
"_npmVersion": "2.14.7",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "filled-array",
|
||||
"raw": "filled-array@^1.0.0",
|
||||
"rawSpec": "^1.0.0",
|
||||
"scope": null,
|
||||
"spec": ">=1.0.0-0 <2.0.0-0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/boxen"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/filled-array/-/filled-array-1.1.0.tgz",
|
||||
"_shasum": "c3c4f6c663b923459a9aa29912d2d031f1507f84",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "filled-array@^1.0.0",
|
||||
"_where": "C:\\Users\\x2mjbyrn\\Source\\Repos\\Skeleton\\node_modules\\boxen",
|
||||
"author": {
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"name": "Sindre Sorhus",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/filled-array/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Returns an array filled with the specified input",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "c3c4f6c663b923459a9aa29912d2d031f1507f84",
|
||||
"tarball": "https://registry.npmjs.org/filled-array/-/filled-array-1.1.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "e5069f67db8683c2eac402d5062b05b2cffa5789",
|
||||
"homepage": "https://github.com/sindresorhus/filled-array",
|
||||
"installable": true,
|
||||
"keywords": [
|
||||
"array",
|
||||
"el",
|
||||
"elements",
|
||||
"fill",
|
||||
"filled",
|
||||
"repeat",
|
||||
"repeating",
|
||||
"str",
|
||||
"string",
|
||||
"text"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "filled-array",
|
||||
"optionalDependencies": {},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sindresorhus/filled-array"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.1.0"
|
||||
}
|
52
node_modules/filled-array/readme.md
generated
vendored
Normal file
52
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