data-object
An object wrapper for easy data manipulation
Last updated 5 years ago by lazurski .
GPL 3 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install data-object 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.0.2                                ...           latest (5 years ago)

2 Versions

  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dependencies (3)
Dev Dependencies (10)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |