1.0.13 • Published 1 year ago

deep-objectify v1.0.13

Weekly downloads
51
License
SEE LICENSE IN LI...
Repository
github
Last release
1 year ago

deep-objectify

Build Status version dependencies devDependencies

Curly brackets all the way down

This is a tiny JS utility that converts deeply nested structures, which may include layers of objects and arrays, to pure nested objects. The key feature is converting arrays to objects. While objects and arrays are more or less equivalent in JS, it may be easier to reason about complicated data processing and storage if you can guaranteee that your complex JSON object has values that are stricly primitives or child JSON objects.

TypeScript definitions included!

Installation

npm install deep-objectify

Usage

var objectify = require('deep-objectify');

objectify({foo: 'bar', x: ['a', 'b']}); // -> {foo: 'bar', x: {'0': 'a', '1': 'b'}}

See also deepObjectifyTests.ts.

1.0.13

1 year ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago