1.1.0 • Published 9 years ago

accessory v1.1.0

Weekly downloads
29,011
License
MIT
Repository
github
Last release
9 years ago

accessory Build Status

Create property accessor/caller statements for dot paths

Install

$ npm install --save accessory

Usage

var accessory = require('accessory')

accessory('window', 'foo.bar')
//=> window['foo']['bar']

accessory('window', 'foo\\.bar')
//=> window['foo.bar']

accessory('window', 'foo.bar(baz)')
//=> window['foo']['bar'](baz)

API

accessory(source, path) -> string

source

Required
Type: string

The source identifier which will prepend the accessors.

path

Required
Type: string

A dot property path, including function calls.

License

MIT © Ben Drucker

1.1.0

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago