# accessory

> Create property accessor/caller statements for dot paths

Latest version **1.1.0** (published 2015-07-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install accessory
pnpm add accessory
yarn add accessory
bun add accessory
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2015-07-17 |
| First published | 2015-07-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Ben Drucker |
| Maintainers | bendrucker |
| Keywords | dot, path, property, accessor, bracket, js |

## Links

- npm: https://www.npmjs.com/package/accessory
- Repository: https://github.com/bendrucker/accessory
- Homepage: https://github.com/bendrucker/accessory#readme
- Issues: https://github.com/bendrucker/accessory/issues
- npm.io page: https://npm.io/package/accessory

## Dependencies (3)

- [ap](https://npm.io/package/ap.md) ~0.2.0
- [dot-parts](https://npm.io/package/dot-parts.md) ~1.0.0
- [balanced-match](https://npm.io/package/balanced-match.md) ~0.2.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.1.0 (latest) — 2015-07-17
- 1.0.1 — 2015-07-13
- 1.0.0 — 2015-07-13

## README

# accessory [![Build Status](https://travis-ci.org/bendrucker/accessory.svg?branch=master)](https://travis-ci.org/bendrucker/accessory)

> Create property accessor/caller statements for dot paths


## Install

```
$ npm install --save accessory
```


## Usage

```js
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](http://bendrucker.me)

---
_Source: https://npm.io/package/accessory · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
