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

babel-plugin-transform-currency-operators

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-currency-operators

https://github.com/scurker/babel-plugin-transform-currency-operators

  • 1.0.0-alpha.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23
increased by130%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-transform-currency-operators Build Status Coverage Status npm

An experimental babel plugin for transforming currency.js operators.

Example

In

import currency from 'currency.js';

var currency1 = currency(1.23);
var currency2 = currency1 + 4.56;
var currency3 = currency2 - 4.56;
var currency4 = currency3 * 2;
var currency5 = currency4 / 4;

Out

import currency from 'currency.js';

var currency1 = currency(1.23);
var currency2 = currency1.add(4.56);
var currency3 = currency2.subtract(4.56);
var currency4 = currency3.multiply(2);
var currency5 = currency4.divide(4);

Installation

With npm:

npm install --save-dev babel-plugin-transform-currency-operators

With yarn:

yarn install babel-plugin-transform-currency-operators --dev

Usage

.babelrc

{
  "plugins": ["transform-currency-operators"]
}

Via CLI

babel --plugins transform-currency-operators

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-currency-operators"]
});

License

MIT

FAQs

Package last updated on 08 Sep 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