Socket
Book a DemoInstallSign in
Socket

babel-plugin-ember-property-computed

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-ember-property-computed

Migrate from function prototype fn.property(args) into Ember.computed(args, fn)

1.0.1
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

babel-plugin-ember-property-computed

Migrate from function prototype fn.property(args) into Ember.computed(args, fn).

Convert computed properties into Ember.computed() to not use prototype anymore. This plugin can be used along with Webpack and other babel plugins just to test in dev server. If you want to overwrite existing files, you can execute this plugin in Node env as well.

Example

In

fullname: function () {
  return `${this.firstName} ${this.lastName}`;
}.property("firstName", "lastName")

Out

fullname: Ember.computed("firstName", "lastName", function () {
  return `${this.firstName} ${this.lastName}`;
})

Installation

$ npm install babel-plugin-ember-property-computed

Usage

.babelrc

{
  "plugins": ["ember-property-computed"]
}

Via CLI

$ babel --plugins ember-property-computed script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["ember-property-computed"]
});

Keywords

Ember

FAQs

Package last updated on 08 Apr 2019

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.