# attr-brick

> Lego plugin to bind node properties to a store attribute

Latest version **0.0.1** (published 2014-02-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install attr-brick
pnpm add attr-brick
yarn add attr-brick
bun add attr-brick
```

## 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.1 |
| Published | 2014-02-28 |
| First published | 2014-02-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Olivier Wietrich |
| Maintainers | bredele |
| Keywords | mvc, mvvm, lego, brick, attribute, binding |

## Links

- npm: https://www.npmjs.com/package/attr-brick
- Repository: https://github.com/bredele/attr-brick
- Issues: https://github.com/bredele/attr-brick/issues
- npm.io page: https://npm.io/package/attr-brick

## Recent versions

- 0.0.1 (latest) — 2014-02-28

## README

# attr-plugin

  [Brick](https://github.com/bredele/brick) plugin to bind a node attribute with a [store](https://github.com/bredele/store) attribute

## Installation

with [component](http://github.com/component/component):

    $ component install bredele/attr-brick

with [nodejs](http://nodejs.org):

    $ component install attr-brick

## Usage

First, add the plugin to your view (see [brick](https://github.com/bredele/brick) to know more about views):

```js
view.add('data-attr', require('attr-brick'));
```

## Basic

```html
<a data-attr="href, github"></a>
```

The plugin will look if it finds the property `github` and listen for changes.

```js
view.set('github', 'http://github.com/bredele');
```

will display:

```html
<a href="http://github.com/bredele"></a>
```
see [live example](https://github.com/bredele/attr-brick/tree/master/example)

## Alternative

[brick](https://github.com/bredele/brick) allows variable substitutions

```html
<a href="{{ github }}"></a>
```

## License

  MIT

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