$ gnpm install accessory
Create property accessor/caller statements for dot paths
$ npm install --save accessory
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)
accessory(source, path)
-> string
Required
Type: string
The source identifier which will prepend the accessors.
Required
Type: string
A dot property path, including function calls.
MIT © Ben Drucker
Copyright 2013 - present © cnpmjs.org | Home |