44[ ![ Gihub package dependents] ( https://badgen.net/github/dependents-pkg/75lb/array-back )] ( https://github.com/75lb/array-back/network/dependents?dependent_type=PACKAGE )
55[ ![ Node.js CI] ( https://github.com/75lb/array-back/actions/workflows/node.js.yml/badge.svg )] ( https://github.com/75lb/array-back/actions/workflows/node.js.yml )
66
7- <a name =" module_array-back " ></a >
8-
97## array-back
10- Takes any input and guarantees an array back.
118
9+ Takes any input and guarantees an array back.
1210- Converts array-like objects (e.g. ` arguments ` , ` Set ` ) to a real array.
1311- Converts ` undefined ` to an empty array.
1412- Converts any another other, singular value (including ` null ` , objects and iterables other than ` Set ` ) into an array containing that value.
1513- Ignores input which is already an array.
1614
17- ** Example**
18- ``` js
19- > const arrayify = require (' array-back' )
15+ - ** Type:** ` package `
16+ - ** Supported runtimes:** Node.Js >= v12
17+ - ** Module type:** ` JavaScript `
18+ - ** Exports:** ` Synchronous Function `
2019
21- > arrayify (undefined )
22- []
20+ #### Example
2321
24- > arrayify (null )
22+ ```
23+ > const arrayBack = require('array-back')
24+ > arrayBack(undefined)
25+ []
26+ > arrayBack(null)
2527[ null ]
26-
27- > arrayify (0 )
28+ > arrayBack(0)
2829[ 0 ]
29-
30- > arrayify ([ 1 , 2 ])
30+ > arrayBack([ 1, 2 ])
3131[ 1, 2 ]
32-
33- > arrayify (new Set ([ 1 , 2 ]))
32+ > arrayBack(new Set([ 1, 2 ]))
3433[ 1, 2 ]
35-
36- > function f (){ return arrayify (arguments ); }
34+ > function f(){ return arrayBack(arguments); }
3735> f(1,2,3)
3836[ 1, 2, 3 ]
3937```
40- <a name =" exp_module_array-back--arrayify " ></a >
4138
42- ### arrayify(input) ⇒ <code >Array</code > ⏏
43- ** Kind** : Exported function
39+ ### arrayBack
40+
41+ Description.
4442
45- | Param | Type | Description |
46- | --- | --- | --- |
47- | input | <code >\* </code > | The input value to convert to an array |
43+ - ** Type:** ` function `
44+ - ** Returns:** ` Array `
4845
46+ ¬
47+ Param
48+ Type
49+ Description
50+ ¬
51+ input
52+ ` any `
53+ The input value to convert to an array
54+ ¬
4955
5056### Load anywhere
5157
@@ -71,6 +77,5 @@ import arrayify from './node_modules/array-back/index.js'
7177
7278* * *
7379
74- © ; 2015-26 [ Lloyd Brookes] ( https://github.com/75lb ) \ <opensource@75lb.com \ > .
80+ © ; 2015-26 [ Lloyd Brookes] ( https://github.com/75lb ) < opensource@75lb.com > .
7581
76- Documented by [ jsdoc-to-markdown] ( https://github.com/jsdoc2md/jsdoc-to-markdown ) .
0 commit comments