This package has been deprecated

Author message:

Use botanist directly

ember-botanist

1.0.1 • Public • Published

ember-botanist Build Status

This addon is a thin wrapper over the Botanist library.

Installation

yarn add [--dev] ember-botanist

Usage

See the Botanist README for more details on usage.

import { transform, rule, simple } from 'botanist';
 
let doMath = transform({
  @rule({ op: 'add', lhs: simple('left'), rhs: simple('right') })
  add({ left, right }) {
    return left + right;
  },
 
  @rule({ op: 'sub', lhs: simple('left'), rhs: simple('right') })
  subtract({ left, right }) {
    return left - right;
  }
});
 
doMath({ op: 'add', lhs: 1, rhs: 2 });
// => 3
 
doMath({ op: 'sub', lhs: { op: 'add', lhs: 2, rhs: 2 }, rhs: 1 });
// => 3

Keywords

Install

npm i ember-botanist

DownloadsWeekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • dfreeman