Skip to content

deathcap/fromarray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fromarray

The opposite of toarray

Build Status

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.

License

MIT

About

convert empty or singular arrays to scalars

Resources

Stars

Watchers

Forks

Packages

No packages published