# evaluable-tag

> The tag has evaluable attribute and it behaves like annotation to next sibling

Latest version **0.0.8** (published 2015-04-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install evaluable-tag
pnpm add evaluable-tag
yarn add evaluable-tag
bun add evaluable-tag
```

## 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.8 |
| Published | 2015-04-22 |
| First published | 2015-03-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Keita Okamoto |
| Maintainers | all-user |
| Keywords | css, javascript |

## Links

- npm: https://www.npmjs.com/package/evaluable-tag
- Repository: https://github.com/all-user/evaluable-tag
- Issues: https://github.com/all-user/evaluable-tag/issues
- npm.io page: https://npm.io/package/evaluable-tag

## Dependencies (2)

- [extend](https://npm.io/package/extend.md) ^2.0.0
- [append-css](https://npm.io/package/append-css.md) ^0.1.1

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 0.0.8 (latest) — 2015-04-22
- 0.0.7 — 2015-04-20
- 0.0.6 — 2015-04-20
- 0.0.5 — 2015-04-18
- 0.0.4 — 2015-04-09
- 0.0.3 — 2015-03-17
- 0.0.2 — 2015-03-17
- 0.0.1 — 2015-03-17

## README

# evaluable-tag

The tag has evaluable attribute and it behaves like annotation to next sibling.


## install
```bash
npm install evaluable-tag
```

## usage

### in browser

```html
<script src="browser/et.js"></script>
<script>
  var ET = require('evaluable-tag');
</script>
```

### in browserify
```javascript
var ET = require('evaluable-tag');
```

## ET.evalBy
html
```html
<span class="et" data-eval="1 + 2">sum</span>
```

javascript
```javascript
var evaluated = ET.evalBy('.et');

var et = evaluated[0];
console.log(et.result); // 3
console.log(et.annotation.textContent); // sum
console.log(et.annotated.textContent); // sum
```

## ET.evalAnnotationsBy
html
```html
<span class="et-a" data-eval="1 + 2">sum</span>
<div>content</div>
```

javascript
```javascript
var annotated = ET.evalAnnotationsBy('.et-a');

var et = annotated[0];
console.log(et.result); // 3
console.log(et.annotation.textContent); // sum
console.log(et.annotated.textContent); // content
```

The `.et-a` element visibility become hidden after calling `evalAnnotationsBy`.

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