# backbone-callbacks

> Anonymous callback style interface for Backbone.js async methods

Latest version **0.1.7** (published 2014-01-14) · 0 weekly downloads

## Install

```sh
npm install backbone-callbacks
pnpm add backbone-callbacks
yarn add backbone-callbacks
bun add backbone-callbacks
```

## 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.7 |
| Published | 2014-01-14 |
| First published | 2012-06-06 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >0.4.x |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | Loren West |
| Maintainers | lorenwest |

## Links

- npm: https://www.npmjs.com/package/backbone-callbacks
- Repository: http://github.com/lorenwest/backbone-callbacks
- Homepage: http://lorenwest.github.com/backbone-callbacks/
- Issues: https://github.com/lorenwest/backbone-callbacks/issues
- npm.io page: https://npm.io/package/backbone-callbacks

## Dependencies (2)

- [backbone](https://npm.io/package/backbone.md) >=0.9.2 < 0.10.0
- [underscore](https://npm.io/package/underscore.md) >=1.4.4 < 1.5.0

## Recent versions

- 0.1.7 (latest) — 2014-01-14
- 0.1.6 — 2014-01-06
- 0.1.5 — 2013-10-04
- 0.1.4 — 2012-11-22
- 0.1.3 — 2012-06-25
- 0.1.2 — 2012-06-14
- 0.1.1 — 2012-06-13
- 0.1.0 — 2012-06-06

## README

## Anonymous callback interface for Backbone.js async methods

[Backbone.js](http://documentcloud.github.com/backbone>Backbone.js) exposes a ```success/error``` style callback interface to the asynchronous methods ```fetch```, ```save```, and ```destroy```.  Example:

    myModel.fetch({success: function(model, response) {
        ...
      },
      error: function(model, response) {
        ...
      }
    });

If you're using Node.js and use your Backbone models on the client as well as the server,
you may want to interact with your models in more of a Node.js async callback style:

    myModel.fetch(function(error, response) {
     ...
    });

This library adds to the existing interface for ```fetch```, ```save```, and ```destroy```, allowing you to choose the style you prefer.

If a callback function is provided as the last argument, it uses that style.  Otherwise it will use the default ```success/error``` style.

To use this libary:

1) Download from github, or ```npm install backbone-callbacks```

2) Include the library in your application.  Load it after Backbone.js on the browser, or require('backbone-callbacks') in Node.js

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