# tie-handlebars

> Handlebars' templates depending on tie's constraints

Latest version **0.2.0** (published 2016-10-03) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install tie-handlebars
pnpm add tie-handlebars
yarn add tie-handlebars
bun add tie-handlebars
```

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2016-10-03 |
| First published | 2016-10-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Quentin Roy |
| Maintainers | quentinroy |
| Keywords | tie, handlebars, constraint, template |

## Links

- npm: https://www.npmjs.com/package/tie-handlebars
- Repository: https://github.com/QuentinRoy/tie-handlebars
- Homepage: https://github.com/QuentinRoy/tie-handlebars#readme
- Issues: https://github.com/QuentinRoy/tie-handlebars/issues
- npm.io page: https://npm.io/package/tie-handlebars

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2016-10-03
- 0.1.0 — 2016-10-03

## README

# Tie-Handlebars
Handlebars' templates depending on [tie](https://github.com/QuentinRoy/tie)'s constraints.

## Usage

```javascript
// Handlebar (compiled) template.
var source = tie("<p>Hello, my name is {{name}}. I am from {{hometown}}. I have " +
     "{{kids.length}} kids:</p>" +
     "<ul>{{#kids}}<li>{{name}} is {{age}}</li>{{/kids}}</ul>");
var template = tie(function(){
    return handlebars.compile(source.get());
});
// Template's argument.
var data = tie({
    "name": "Alan",
    "hometown": "Somewhere, TX",
    "kids": [
        {"name": "Jimmy", "age": "12"},
        {"name": "Sally", "age": "4"}
    ]
});
// Constraint on the result of the application of data on the template template.
var result = tieHandlebars(template, data);
```

## Note

- The template nor the data does not have to be constraints. One may directly provide their value to `tieHandlebars`.
- Non compiled template are not supported. Ideally, you should [precompile](http://handlebarsjs.com/precompilation.html) your templates.

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