path-object

access object keys with a path

MIT 7 个版本
安装
npm install path-object
yarn add path-object
pnpm add path-object
bun add path-object
README

path-object

Build Status

Install

$ npm install -S path-object

Example

var PathObject = require('path-object')()

var fileObj = new PathObject()

fileObj.set('path/to/file1', 'file1 content')
fileObj.set('path/to/file2', 'file2 content')
fileObj.set('another/path/to/file', 'another file content')

console.log('dump:', fileObj.dump())
console.log('dump with scope:', fileObj.dump('path'))

console.log('get by path:', fileObj.get('another/path/to/file'))

Licence

The MIT License (MIT)

Copyright © 2015 Christoph Witzko

版本列表
2.3.0 2015-02-20
2.2.0 2015-02-20
2.1.1 2015-02-18
2.1.0 2015-02-10
2.0.0 2015-02-10
1.0.1 2015-02-10
1.0.0 2015-02-10