accessory
Create property accessor/caller statements for dot paths
Last updated 10 years ago by bendrucker .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install accessory 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.1.0                                ...           latest (10 years ago)

3 Versions

  • 1.1.0                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |