scurker / currency.js

A javascript library for handling currencies
https://currency.js.org
MIT License
3.15k stars 142 forks source link

Npm 2.0.4 doesn't match src/currency.js #453

Closed mgatto closed 1 year ago

mgatto commented 1 year ago

src/currency.js uses ES6 const and so forth while version 2.0.4 on npm reverts to var and other code differences. Which one is authoritative, when both have been current for 2-3 years? Should npm be updated?

scurker commented 1 year ago

This is intentional. The package that gets shipped in npm is transpiled from the source code and both an es module and a common js module are both included in the npm package. Bundlers will typically pick the correct one based on package.json metadata.