0.0.2 • Published 9 years ago

data-object v0.0.2

Weekly downloads
6
License
GPL 3
Repository
github
Last release
9 years ago

It's a fork from lzrski/config-object.

The goal is to put all reusable data manipulation logic here and use it internally in config-object.

Install

npm install data-object

Usage

Here's what you can do now:

Data = require 'data-object'
data = new Data
  a:
    b: 1
    c:
      d: 2
      e: 'Elf'
    f: 'Ferret'

data.get 'a/c/e'  # Elf
data.get 'a/c'    # d: 2, e: Elf
data.bonus = 200
data.get 'bonus'  # 200

ATM only most basic get works. More functionality is to come, including:

  • No dependencies (esp. lodash)
  • Drop-in replacement for most of config-object code

I will successively move config-object's features here. See pending test cases for more todo items.