# resturlify

> Consistently generate restful urls

Latest version **1.3.0** (published 2015-07-14) · MIT license · 0 weekly downloads

## Install

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

## 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 | 2015-07-14 |
| First published | 2015-06-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ZeroMcMuffin |
| Maintainers | zeromcmuffin |
| Keywords | REST, URLs |

## Links

- npm: https://www.npmjs.com/package/resturlify
- Repository: https://github.com/ZeroMcMuffin/resturlify
- Issues: https://github.com/ZeroMcMuffin/resturlify/issues
- npm.io page: https://npm.io/package/resturlify

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.3.0 (latest) — 2015-07-14
- 1.2.0 — 2015-07-13
- 1.1.0 — 2015-07-07
- 1.0.0 — 2015-06-11

## README

# RestUrlify
Consistently Generate Rest URLs

## Why?
I wrote this to help transition my team from an RPC-each-call-a-snowflake tendency to REST. 

## Use Anywhere
This library works in the client and on the server.  

## Install
````
bower install resturlify
````

Or

````
npm install resturlify
````

### Examples
#### Constructor
```javascript
var urlTools = new RestUrlify("http://www.web.com/api");
```

#### Simple
```javascript
urlTools.buildUrl()
```

Returns: http://www.web.com/api

#### With Params
```javascript
urlTools.buildUrl({ 
  resource: 'resource',
  query: {id : 1}
})
```

Returns: http://www.web.com/api/resource?id=1
 
#### Custom Methods
```javascript
urlTools.buildUrl({
  resource: 'resource',
  id: 1,
  customMethod: 'approve'
})
```

Returns: http://www.web.com/api/resource/1/approve

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