UNPKG
siu
Version:
latest (0.4.0)
0.4.0
0.3.1
0.3.0
0.2.0
0.1.0
0.0.3
0.0.2
0.0.1
Seamless Immutable Utilities
github.com/Versent/siu
Versent/siu
siu
/
lib
/
utils
/
wrapAsArray.js
7 lines
(5 loc)
•
218 B
JavaScript
View Raw
1
2
3
4
5
6
7
var
isArray =
require
(
'./isArray'
);
var
SI
=
require
(
'seamless-immutable'
);
module
.
exports
=
function
wrapAsArray
(
recordOrRecords
) {
return
isArray
(recordOrRecords) ? recordOrRecords :
SI
([recordOrRecords]); };