currency.js icon indicating copy to clipboard operation
currency.js copied to clipboard

Why is not this working?

Open hirppa opened this issue 3 years ago • 2 comments

const test = currency(0); test.add(1);

console.log(test.value); // 0 instead of 1

hirppa avatar Jun 22 '22 11:06 hirppa

It's immutable.

const a = currency(0);
const b = a.add(1);

console.log(a.value); // 0
console.log(b.value); // 1

It's one of the main features: image

eXamadeus avatar Jun 24 '22 04:06 eXamadeus