Permalink
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (15 sloc) 627 Bytes
# written in [coco](https://github.com/satyr/coco), to demonstrate uRequire's ResourceConverters
# Places item in a new array, if its not already an array.
# @return Array If item not already an Array, it becomes an item of an array.
# If its null or undefined, empty array is returned (to prevent loops)
# @param item <anything> item to place in a (new) array, if its not already.
isAgree = require 'agreement/isAgree'
arrayize = (item)-> # fltr is a VERY BAD idea!
if _.isArray item
item
else
if _.isUndefined(item) or _.isNull(item)
[]
else
[item]
module.exports = arrayize