array-back
Advanced tools
Comparing version 2.0.0 to 3.0.0
{ | ||
"name": "array-back", | ||
"author": "Lloyd Brookes <75pound@gmail.com>", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "Guarantees an array back", | ||
"repository": "https://github.com/75lb/array-back.git", | ||
"license": "MIT", | ||
"main": "dist/index.js", | ||
"keywords": [ | ||
@@ -16,17 +17,19 @@ "to", | ||
"engines": { | ||
"node": ">=4" | ||
"node": ">=6" | ||
}, | ||
"scripts": { | ||
"test": "test-runner test.js", | ||
"docs": "jsdoc2md -t README.hbs index.js > README.md; echo", | ||
"cover": "istanbul cover ./node_modules/.bin/test-runner test.js && cat coverage/lcov.info | ./node_modules/.bin/coveralls; echo" | ||
"test": "node --experimental-modules test.mjs && npm run test:js", | ||
"test:js": "npm run dist:test && node dist/test.js", | ||
"docs": "jsdoc2md -t README.hbs index.mjs -c build/jsdoc.conf > README.md; echo", | ||
"cover": "nyc test-runner test.js && nyc report --reporter=text-lcov | coveralls", | ||
"dist": "rollup -c build/index.config.js", | ||
"dist:test": "rollup -c build/test.config.js" | ||
}, | ||
"dependencies": { | ||
"typical": "^2.6.1" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"coveralls": "^2.13.1", | ||
"jsdoc-to-markdown": "^3.0.0", | ||
"test-runner": "^0.4.0" | ||
"coveralls": "^3.0.2", | ||
"jsdoc-to-markdown": "^4.0.1", | ||
"rollup": "^0.67.3", | ||
"test-runner": "^0.5.1" | ||
} | ||
} |
@@ -11,9 +11,2 @@ [![view on npm](https://img.shields.io/npm/v/array-back.svg)](https://www.npmjs.org/package/array-back) | ||
## array-back | ||
**Example** | ||
```js | ||
const arrayify = require('array-back') | ||
``` | ||
<a name="exp_module_array-back--arrayify"></a> | ||
### arrayify(input) ⇒ <code>Array</code> ⏏ | ||
Takes any input and guarantees an array back. | ||
@@ -26,29 +19,62 @@ | ||
**Kind**: Exported function | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| input | <code>\*</code> | the input value to convert to an array | | ||
**Example** | ||
```js | ||
> a.arrayify(undefined) | ||
> const arrayify = require('array-back') | ||
> arrayify(undefined) | ||
[] | ||
> a.arrayify(null) | ||
> arrayify(null) | ||
[ null ] | ||
> a.arrayify(0) | ||
> arrayify(0) | ||
[ 0 ] | ||
> a.arrayify([ 1, 2 ]) | ||
> arrayify([ 1, 2 ]) | ||
[ 1, 2 ] | ||
> function f(){ return a.arrayify(arguments); } | ||
> function f(){ return arrayify(arguments); } | ||
> f(1,2,3) | ||
[ 1, 2, 3 ] | ||
``` | ||
<a name="exp_module_array-back--arrayify"></a> | ||
### arrayify(input) ⇒ <code>Array</code> ⏏ | ||
**Kind**: Exported function | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| input | <code>\*</code> | the input value to convert to an array | | ||
### Load anywhere | ||
This library can be loaded anywhere, natively without transpilation. | ||
Node.js: | ||
```js | ||
const arrayify = require('array-back') | ||
``` | ||
Within Node.js with ECMAScript Module support enabled: | ||
```js | ||
import arrayify from 'array-back' | ||
``` | ||
Within an modern browser ECMAScript Module: | ||
```js | ||
import arrayify from './node_modules/array-back/index.mjs' | ||
``` | ||
Old browser (adds `window.arrayBack`): | ||
```html | ||
<script nomodule src="./node_modules/array-back/dist/index.js"></script> | ||
``` | ||
* * * | ||
© 2015-17 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown). | ||
© 2015-18 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
78
11475
4
13
219
- Removedtypical@^2.6.1
- Removedtypical@2.6.1(transitive)