Skip to content

Commit

Permalink
Amend .mjs exports. Remove extension from main field in package.json.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcl committed May 22, 2018
1 parent 12a9eac commit 08ee99c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -35,7 +35,7 @@ or as a CommonJS, Node.js or AMD module using `require`.

If using an ES6 transpiler, or Node.js with the [`--experimental-modules`](https://nodejs.org/api/esm.html) flag, try

import Big from './big';
import Big from 'big.js';

*In all examples below, `var`, semicolons and `toString` calls are not shown. If a commented-out value is in quotes it means `toString` has been called on the preceding expression.*

Expand Down
7 changes: 2 additions & 5 deletions big.mjs
Expand Up @@ -4,7 +4,6 @@
* Copyright (c) 2017 Michael Mclaughlin <M8ch88l@gmail.com>
* https://github.com/MikeMcl/big.js/LICENCE
*/
var Big,


/************************************** EDITABLE DEFAULTS *****************************************/
Expand All @@ -16,7 +15,7 @@ var Big,
* The maximum number of decimal places (DP) of the results of operations involving division:
* div and sqrt, and pow with negative exponents.
*/
DP = 20, // 0 to MAX_DP
var DP = 20, // 0 to MAX_DP

/*
* The rounding mode (RM) used when rounding to the above decimal places.
Expand Down Expand Up @@ -918,8 +917,6 @@ P.valueOf = P.toJSON = function () {
// Export


Big = _Big_();

Big.Big = Big;
export var Big = _Big_();

export default Big;
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -20,7 +20,7 @@
"type": "git",
"url": "https://github.com/MikeMcl/big.js.git"
},
"main": "big.js",
"main": "big",
"module": "big.mjs",
"author": {
"name": "Michael Mclaughlin",
Expand Down

0 comments on commit 08ee99c

Please sign in to comment.