decimal.js-light.macro

1.0.0 • Public • Published

decimal.js-light.macro

Build Status npm version MIT License semantic-release

Usage

import decimal from 'decimal.js-light.macro'
 
const a = decimal(1)
const b = decimal(- 3 * 4 / 5)
const c = decimal(- 3 + 4 - 5)
const d = decimal(1 ** 2 ** 3)
 
      ↓ ↓ ↓ ↓ ↓ ↓
 
import { Decimal as _Decimal } from 'decimal.js-light';
 
 
const a = _Decimal('1');
const b = _Decimal(a).sub(_Decimal(_Decimal('3').mul('4')).div('5'));
const c = _Decimal(_Decimal(_Decimal(a).sub('3')).add('4')).sub('5');
const d = _Decimal('1').pow(_Decimal('2').pow('3'));

Contributors

Thanks goes to these wonderful people (emoji key):


gtkatakura

💻 🤔 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!

/decimal.js-light.macro/

    Package Sidebar

    Install

    npm i decimal.js-light.macro

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    467 kB

    Total Files

    14

    Last publish

    Collaborators

    • gtkatakura