Socket
Book a DemoInstallSign in
Socket

ember-cli-rison

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-rison

Rison template helpers and computed property macros for an Ember CLI application.

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

Ember-cli-rison

Include rison in an ember-cli app.

This addon uses rison-node as its NPM rison dependency.

Usage

Computed Property Macros

Ships with the following computed property macros: risonEncode, risonDecode.

import Component from '@ember/component';
import risonEncode from 'ember-cli-rison/computeds/rison-encode';

export default Component.extend({
  encoded: risonEncode('value')
});

Handlebars Helpers

{{rison-encode value}} {{!-- encode value in RISON --}}
{{rison-decode value}} {{!-- decode RISON value --}}

Helpers in components

import Component from '@ember/component';
import { risonEncode } from 'ember-cli-rison/helpers/rison-encode';
import { risonDecode, safeRisonDecode } from 'ember-cli-rison/helpers/rison-decode';

export default Component.extend({

  didReceiveAttrs() {
    this._super(...arguments);
    this.set('decoded', safeRisonDecode(this.get('encoded')));
  },

  actions: {
    update(value) {
      this.get('update')(risonEncode(value));
    }
  }
});

ES6 Rison

This addon provides the ability to import rison as an ES6 module.

import rison from 'rison';

Installation

  • git clone <repository-url> this repository
  • cd ember-cli-rison
  • npm install

Running

Running Tests

  • npm test (Runs ember try:each to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://ember-cli.com/.

Keywords

ember-addon

FAQs

Package last updated on 17 Apr 2020

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.