lib/helpers/to-array.js

Summary

Maintainability
A
0 mins
Test Coverage
const slicer = Array.prototype.slice

module.exports = function toArray (o) {
  if (!o || !o.length) return []
  return slicer.call(o)
}