# drl

> > Url addressable function storage.

Latest version **0.0.2** (published 2017-09-01) · MIT license · 0 weekly downloads

## Install

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

## 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.0.2 |
| Published | 2017-09-01 |
| First published | 2017-06-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | g-harel |
| Maintainers | g-harel |

## Links

- npm: https://www.npmjs.com/package/drl
- Repository: https://github.com/g-harel/drl
- Homepage: https://github.com/g-harel/drl#readme
- Issues: https://github.com/g-harel/drl/issues
- npm.io page: https://npm.io/package/drl

## Dependencies (1)

- [path-to-regexp](https://npm.io/package/path-to-regexp.md) ^2.0.0

## Recent versions

- 0.0.2 (latest) — 2017-09-01
- 0.0.1 — 2017-06-03
- 0.0.0 — 2017-06-03

## README

# [drl](https://github.com/g-harel/drl)

> Url addressable function storage.

Store callback functions and invoke them using a url path.

Express-style route matching. (ex. `/(apple-)?icon-:res(\\d+).png`)

Priority to first added matching route.

## Install

````
$ npm install --save drl
````

## Usage

````javascript
const drl = require('drl');

const store = drl();

// adding a path
store.add(path, callback);
           ┌┘      └┐
         String  Function

// querying paths
store.exec(path, params?);
           ┌┘      └┐
         String   Object
````

````javascript
const drl = require('drl');

const store = drl();

store.add('/user/:id/execute', ({id, action}) => {
    // ...
    return true;
});

store.exec('user/123/execute', {action: 'DELETE'}); // true
````

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