# can-single-reference

> Assign a value to a function that can be collected later

Latest version **1.3.0** (published 2019-12-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install can-single-reference
pnpm add can-single-reference
yarn add can-single-reference
bun add can-single-reference
```

## 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.3.0 |
| Published | 2019-12-02 |
| First published | 2018-05-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 17.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | DoneJS Contributors |
| Maintainers | cherif_b, justinbmeyer, nlundquist, stin13 |
| Keywords | canjs, donejs, donejs-plugin |

## Links

- npm: https://www.npmjs.com/package/can-single-reference
- Repository: https://github.com/canjs/can-single-reference
- Homepage: http://canjs.com
- Issues: https://github.com/canjs/can-single-reference/issues
- npm.io page: https://npm.io/package/can-single-reference

## Dependencies (1)

- [can-cid](https://npm.io/package/can-cid.md) ^1.1.2

## Recent versions

- 1.3.0 (latest) — 2019-12-02
- 1.2.2 — 2019-07-02
- 1.2.1 — 2019-07-01
- 1.2.0 — 2018-07-10
- 1.0.0 — 2018-05-18

## README

# can-single-reference

[![Build Status](https://travis-ci.org/canjs/can-single-reference.svg?branch=master)](https://travis-ci.org/canjs/can-single-reference)

Assign a value to a function that can be collected later

```js
import singleReference from "can-single-reference";

var obj = {};
singleReference.set(obj, 'pet', 'dog');
singleReference.getAndDelete(obj, 'pet') //-> 'dog'

obj //-> {}
```

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