Socket
Socket
Sign inDemoInstall

ember-lodash-computed-decorators

Package Overview
Dependencies
1
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ember-lodash-computed-decorators

Ember computed decorators for `ember-lodash-computed`


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Install size
18.8 MB
Created
Weekly downloads
 

Readme

Source

ember-lodash-computed-decorators

npm version Build Status Ember Observer Score

Decorators for lodash computed properties in ember-lodash-computed. This project version should stay in sync with ember-lodash-computed so the interface is consistent and expected.

Installation

# ember-cli > 0.2.3
ember install ember-lodash-computed
ember install ember-lodash-computed-decorators
# ember-cli <= 0.2.3
ember install:addon ember-lodash-computed
ember install:addon ember-lodash-computed-decorators

Usage

import Ember from 'ember';
import { isString } from 'ember-lodash-computed-decorators';

export default Ember.Object.create({
  foo: "foo",
  @isString('foo') isFooString, // true
});

Implemented Computed Methods

  • isArguments
  • isArray
  • isBoolean
  • isDate
  • isElement
  • isEmpty
  • isFunction
  • isNaN
  • isNative
  • isNull
  • isNumber
  • isObject
  • isPlainObject
  • isRegExp
  • isString
  • isTypedArray
  • isUndefined

Blueprints

There are also blueprints added as part of this repo. You can generate custom computed decorator methods by doing the following. The command will generate the custom computed, as well as the decorator for said computed.

ember generate computed-decorator foo

After implementing the computed generated at app/computeds/foo.js, you can then use it in your project like so:

import Ember from 'ember';
import { foo } from 'app/decorators/foo';

export default Ember.Object.create({
  bar: "bar",
  @foo('bar') barComputed,
});

Keywords

FAQs

Last updated on 14 Apr 2016

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc