# @aurorats/expression

> Aurora expression, an template expression evaluation

Latest version **0.1.12** (published 2020-12-26) · MIT license · 0 weekly downloads

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

## Install

```sh
npm install @aurorats/expression
pnpm add @aurorats/expression
yarn add @aurorats/expression
bun add @aurorats/expression
```

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.12 |
| Published | 2020-12-26 |
| First published | 2020-09-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 129.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | salem.ebo |

## Links

- npm: https://www.npmjs.com/package/@aurorats/expression
- Homepage: https://github.com/aurorats/aurora
- npm.io page: https://npm.io/package/@aurorats/expression

## Recent versions

- 0.1.12 (latest) — 2020-12-26
- 0.1.11 — 2020-09-30
- 0.1.10 — 2020-09-11

## README

# Aurora Expression

Aurora expression, an template expression evaluation.

## `Install`

``` bash
npm i --save @aurorats/expression
```

``` bash
yarn add @aurorats/expression
```


## Example
```ts
import { NodeExpression, parseJSExpression } from '@aurorats/expression';

let context:{[key: string]: any} = {
    a: 6,
    b: 4,

    g: {
        c: 7,
        d: 3
    }
};
let exp = `a + b === g.c + g.d`;

let expNode:NodeExpression = parseJSExpression(exp);

console.log(expNode.toString());
console.log(expNode.get(context));

exp = `c = a + g.d`;
expNode = parseJSExpression(exp);

console.log(expNode.get(context));
console.log(context.c);

```

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