@thi.ng/strings
Advanced tools
Comparing version 0.4.2 to 0.4.3
@@ -6,2 +6,14 @@ # Change Log | ||
<a name="0.4.3"></a> | ||
## [0.4.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/strings@0.4.2...@thi.ng/strings@0.4.3) (2018-09-24) | ||
### Bug Fixes | ||
* **strings:** rename number parsers ([8cbfb97](https://github.com/thi-ng/umbrella/commit/8cbfb97)) | ||
<a name="0.4.2"></a> | ||
@@ -8,0 +20,0 @@ ## [0.4.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/strings@0.4.1...@thi.ng/strings@0.4.2) (2018-09-24) |
{ | ||
"name": "@thi.ng/strings", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"description": "Various string formatting & utility functions", | ||
@@ -46,3 +46,3 @@ "main": "./index.js", | ||
}, | ||
"gitHead": "cf05efbf251312aff6a7b96861c79d245f4418cd" | ||
"gitHead": "febe3c36d4c7e5a5f71ca89a68d27eeb8278397d" | ||
} |
@@ -1,2 +0,2 @@ | ||
export declare const parseInt: (x: string, defaultVal?: number, radix?: number) => any; | ||
export declare const parseFloat: (x: string, defaultVal?: number) => any; | ||
export declare const maybeParseInt: (x: string, defaultVal?: any, radix?: number) => any; | ||
export declare const maybeParseFloat: (x: string, defaultVal?: any) => any; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parseInt = (x, defaultVal = 0, radix = 10) => { | ||
const n = exports.parseInt(x, radix); | ||
exports.maybeParseInt = (x, defaultVal = 0, radix = 10) => { | ||
const n = parseInt(x, radix); | ||
return isNaN(n) ? defaultVal : n; | ||
}; | ||
exports.parseFloat = (x, defaultVal = 0) => { | ||
const n = exports.parseFloat(x); | ||
exports.maybeParseFloat = (x, defaultVal = 0) => { | ||
const n = parseFloat(x); | ||
return isNaN(n) ? defaultVal : n; | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28942