fromarray

convert empty or singular arrays to scalars

fromarray

The opposite of toarray

Usage:

var fromarray = require('fromarray');

console.log(fromarray([]));       // undefined
console.log(fromarray(['test']);  // 'test'
console.log(fromarray([1,2,3]));  // [1,2,3]

Possibly useful when you have an array but want a scalar.

MIT