šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

ember-preferences

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-preferences

Easy way of managing user preferences on the client side

1.2.1
latest
Source
npm
Version published
Weekly downloads
65
-59.63%
Maintainers
1
Weekly downloads
Ā 
Created
Source

Ember Preferences

Build Status Latest version Ember versions

Easy way of managing user preferences on the client side with local storage (and other providers in the future)

Installation

$ ember install ember-preferences

Documentation

See DOCUMENTATION.md.

Synopsis

import Ember from 'ember';
import preference from 'ember-preference';

export default Ember.Component.extend({
  isVisible: preference('isVisible', { defaultValue: true }),

  actions: {
    onHide() {
      this.set('isVisible', false);
    }
  }
});

Every time isVisible is changed, the changes are stored in local storage. If you reload the page, the value is retrieved from local storage on get.

Development

Running

  • ember server
  • Visit your app at http://localhost:4200.

Running Tests

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

Building

  • ember build

Project's health

Build Status Codacy Badge Ember Observer Score

License

ember-preferences is licensed under the MIT license.

See LICENSE for the full license text.

Keywords

ember-addon

FAQs

Package last updated on 14 Jun 2016

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