# ember-cli-once

> The default blueprint for ember-cli addons.

Latest version **0.1.0** (published 2015-04-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-cli-once
pnpm add ember-cli-once
yarn add ember-cli-once
bun add ember-cli-once
```

## 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 | 2015-04-29 |
| First published | 2015-04-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | j- |
| Keywords | ember-addon |

## Links

- npm: https://www.npmjs.com/package/ember-cli-once
- npm.io page: https://npm.io/package/ember-cli-once

## Dependencies (1)

- [ember-cli-babel](https://npm.io/package/ember-cli-babel.md) ^5.0.0

## Recent versions

- 0.1.0 (latest) — 2015-04-29

## README

# ember-cli-once

[![master branch build status][travis-svg]][travis-url]

Ember CLI one-time calculation addon.

`ember-cli-once` exposes a factory which limits a function's executions. Its
return value will be calculated on first execution and cached. Subsequent calls
will immediately return the cached result.

## Example

```js
import Ember from 'ember';
import once from 'once';

var i = 0;
var foo = Ember.Object.create({
	increment: once(function () {
		// only ever hit once
		return ++i;
	})
});

foo.increment(); // -> 1
foo.increment(); // -> 1
```

## Installing

With [npm][npm]:

```sh
$ npm install --save ember-cli-once
```

Or with [Ember CLI][cli]:

```sh
$ ember install ember-cli-once
```

## License

[MIT license](LICENSE.md).

[travis-svg]: https://travis-ci.org/j-/ember-cli-once.svg?branch=master
[travis-url]: https://travis-ci.org/j-/ember-cli-once
[ember]: http://emberjs.com/
[npm]: https://www.npmjs.com/
[cli]: http://www.ember-cli.com/

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