Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-es5-property-mutators

Package Overview
Dependencies
Maintainers
6
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-es5-property-mutators

Compile ES5 property mutator shorthand syntax to Object.defineProperty

  • 6.24.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18K
increased by26.78%
Maintainers
6
Weekly downloads
 
Created
Source

babel-plugin-transform-es5-property-mutators

This plugin allows Babel to transform object initializer mutators into Object.defineProperties.

Example

In

var foo = {
  get bar() {
    return "bar";
  }
};

Out

var foo = Object.defineProperties({}, {
  bar: {
    get: function () {
      return "bar";
    },
    enumerable: true,
    configurable: true
  }
});

Installation

npm install --save-dev babel-plugin-transform-es5-property-mutators

Usage

.babelrc

{
  "plugins": ["transform-es5-property-mutators"]
}

Via CLI

babel --plugins transform-es5-property-mutators script.js

Via Node API

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

Keywords

FAQs

Package last updated on 07 Apr 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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc