Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 05d419489a | |||
| 5b64c4635d | |||
| 886863d655 | |||
| 583f0754bf | |||
| cf01332643 | |||
| 0acb2bcf49 | |||
| 54304065b0 |
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartmoney",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.6",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartmoney",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.6",
|
||||
"private": false,
|
||||
"description": "handle monetary values",
|
||||
"main": "dist/index.js",
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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(',', '.'));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user