Socket
Book a DemoInstallSign in
Socket

ember-botanist

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-botanist

An Ember addon to provide the Botanist library

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

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

ember-addon

FAQs

Package last updated on 12 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts