# setter-method

> getter setter methods without the boilerplate

Latest version **0.1.0** (published 2013-11-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install setter-method
pnpm add setter-method
yarn add setter-method
bun add setter-method
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2013-11-16 |
| First published | 2013-11-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jake Rosoman |
| Maintainers | jkroso |
| Keywords | getter, setter |

## Links

- npm: https://www.npmjs.com/package/setter-method
- Repository: https://github.com/jkroso/getset
- Issues: https://github.com/jkroso/getset/issues
- npm.io page: https://npm.io/package/setter-method

## Recent versions

- 0.1.0 (latest) — 2013-11-16

## README

# setter-method

  getter setter methods without the boilerplate

## Installation

_With [packin](//github.com/jkroso/packin) or [component](//github.com/component/component)_

    $ packin add jkroso/setter-method

then in your app:

```js
var addSetter = require('setter-method')
```

## API

### addSetter(object, property, default)

  create a chainable getter/setter method on `obj`

```js
var object = {};

// create methods and default values
addSetter(object, 'width', 50);
addSetter(object, 'height', 100);
addSetter(object, 'color', 'aliceblue');

// set values
object
  .width(1200)
  .height(800);

// get values
object.width(); // => 1200
object.color(); // => 'aliceblue'
```

## Running the tests

Just run `make` and navigate your browser to the test directory.

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