# vine

> API builder

Latest version **0.1.1** (published 2013-05-23) · 0 weekly downloads

## Install

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

## 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.1.1 |
| Published | 2013-05-23 |
| First published | 2011-07-14 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Craig Condon |
| Maintainers | architectd |

## Links

- npm: https://www.npmjs.com/package/vine
- Repository: http://github.com/crcn/vine
- npm.io page: https://npm.io/package/vine

## Dependencies (1)

- [outcome](https://npm.io/package/outcome.md) *

## Recent versions

- 0.1.1 (latest) — 2013-05-23
- 0.1.0 — 2012-12-06
- 0.0.14 — 2012-02-17
- 0.0.13 — 2011-12-31
- 0.0.12 — 2011-12-17
- 0.0.11 — 2011-11-30
- 0.0.10 — 2011-11-14
- 0.0.8 — 2011-09-12
- 0.0.7 — 2011-08-15
- 0.0.6 — 2011-08-14
- 0.0.5 — 2011-08-10
- 0.0.1-2 — 2011-07-18
- 0.0.1-1 — 2011-07-14
- 0.0.1 — 2011-07-14

## README

Vine -  JSON Message builder           
============================

What's this?
------------

Just a small utility to help build consistent JSON messages, usually for API's.

Why?
----

Consistency. It's also cleaner, and easier to maintain. 


Where should I use this?
------------------------

	- API
	- nice replacement for callback(err, result);

Code Usage:
-----------


```javascript

var vine = require('vine');


var data = vine.message('hello %s %s','craig','condon').

error('this is an error').

warning('this is a warning').

//time to cache this response
ttl(5).

//result data = success
result({data:'and this is some data'});


console.log(data.data); 

/* output:


	{ message: 'hello craig condon',
	  errors: [ { message: 'this is an error' } ],
	  warnings: [ { message: 'this is a warning' } ],
	  ttl: 5,
	  result: { data: 'and this is some data' } }
	
*/

```

	
To Do: 
------

- code != clean

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