# sla

> A module which avoid boilerplate code when coding an SLA function in Node

Latest version **0.0.3** (published 2013-07-16) · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2013-07-16 |
| First published | 2013-04-09 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | marcosnils, xetorthio |

## Links

- npm: https://www.npmjs.com/package/sla
- Repository: https://github.com/mercadolibre/node-sla
- Issues: https://github.com/mercadolibre/node-sla/issues
- npm.io page: https://npm.io/package/sla

## Recent versions

- 0.0.3 (latest) — 2013-07-16
- 0.0.2 — 2013-04-09

## README

node-sla
========

A tiny SLA node module that avoids setTimeout boilerplate code and allows an elapsed callback to be passed.

## Example
```javascript
var sla = require('sla');

//Will execute the code in the first callback
sla(1000, function(done) {
    console.log("Waiting....");
    setTimeout(done,900);
  }, function() {
    console.log("Elapsed");
  });
  
//Will execute the code in the second(elapsed) callback
sla(1000, function(done) {
    console.log("Waiting....");
    setTimeout(done,1001);
  }, function() {
    console.log("Elapsed");
  });
```
## Installation

    $ npm install sla

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