Skip to content

retrohacker/objectify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

objectify

A little library that recursively converts an object with arrays to an object with objects.

Install

yarn add @retrohacker/objectify

Usage

objectify({
  'foo': [
    { 'a': 1 },
    { 'b': 2 }]
  }
)

yields

{
  'foo': {
    'foo_0': { 'a': 1 },
    'foo_1': { 'b': 2 }
  }
}

and

{
  'foo': [1, 2, 3],
  'bar': ['a', 'b', 'c']
}

yields

{
  'foo': [1, 2, 3],
  'bar': ['a', 'b', 'c']
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors