# breath

> builds a javascript variable from a template.

Latest version **0.2.0** (published 2014-01-09) · 0 weekly downloads

## Install

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

## 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.2.0 |
| Published | 2014-01-09 |
| First published | 2013-09-05 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Yosuke Kumakura |
| Maintainers | kumatch |

## Links

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

## Dependencies (3)

- [async](https://npm.io/package/async.md) ~0.2
- [lodash](https://npm.io/package/lodash.md) ~2.4
- [nestraight](https://npm.io/package/nestraight.md) 0.3

## Recent versions

- 0.2.0 (latest) — 2014-01-09
- 0.1.5 — 2014-01-09
- 0.1.4 — 2013-09-25
- 0.1.3 — 2013-09-23
- 0.1.2 — 2013-09-16
- 0.1.1 — 2013-09-16
- 0.1.0 — 2013-09-09
- 0.0.2 — 2013-09-06
- 0.0.1 — 2013-09-05

## README

breath
===========

builds a javascript variable from a template.

[![Build Status](https://travis-ci.org/kumatch/breath.png?branch=master)](https://travis-ci.org/kumatch/breath)


Install
-----

    $ npm install breath



Usage
-----

```javascript
var breath = require('breath');

var template = {
    say: {
        hello: "Hello <%= params.name %> (<%= params.birth %>)"
    },

    params: {
        name: "javascript",
        birth: 1995
    }
};

var obj1 = breath(template).createSync();
console.log(obj1.say.hello); // "Hello javascript (1995)"

var obj2 = breath(template).createSync({ params: { birth: "by Netscape" } });
console.log(obj2.say.hello); // "Hello javascript (by Netscape)"

var value = breath(template).get('say.hello', { params: { name: "Node", birth: 2009 } });
console.log(value); // "Hello Node (2009)"

// async
breath(template).create(function (err, obj) {
    //...
});

breath(template).create({ params: { name: "world" }}, function (err, obj) {
    //...
});
```



License
--------

Licensed under the MIT License.

Copyright (c) 2013 Yosuke Kumakura

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

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