Skip to content

developit/object-shape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

object-shape

NPM

Returns a String description of a given object's shape.

import shape from 'object-shape';

shape('hello')        // string
shape(2)              // number
shape(undefined)      // undefined
shape(null)           // [Null]
shape({ a:1, b:2 })   // [Object a,b]
shape(/reg/i)         // [RegExp]
shape(new Foo())      // [Foo a,b,c]