6 Commits

Author SHA1 Message Date
05d419489a 1.0.6 2019-07-09 00:44:28 +02:00
5b64c4635d fix(core): update 2019-07-09 00:44:27 +02:00
886863d655 1.0.5 2019-07-09 00:43:55 +02:00
583f0754bf fix(core): update 2019-07-09 00:43:54 +02:00
cf01332643 1.0.4 2019-07-09 00:42:23 +02:00
0acb2bcf49 fix(core): update 2019-07-09 00:42:23 +02:00
4 changed files with 8 additions and 4 deletions

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartmoney",
"version": "1.0.3",
"version": "1.0.6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartmoney",
"version": "1.0.3",
"version": "1.0.6",
"private": false,
"description": "handle monetary values",
"main": "dist/index.js",

View File

@@ -1,8 +1,10 @@
// tslint:disable-next-line: no-implicit-dependencies
import { expect, tap } from '@pushrocks/tapbundle';
import * as smartmoney from '../ts/index';
tap.test('first test', async () => {
console.log(smartmoney.standardExport);
const myNumber = smartmoney.parseEuropeanNumberString('1.000,50');
expect(myNumber).to.equal(1000.5);
});
tap.start();

View File

@@ -1,3 +1,5 @@
import * as plugins from './smartmoney.plugins';
export let standardExport = 'Hi there! :) This is an exported string';
export const parseEuropeanNumberString = (europeanNumberString: string): number => {
return parseFloat(europeanNumberString.replace('.', '').replace(',', '.'));
};