@onivoro/isomorphic-common 22.0.1 → 22.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/lib/functions/kebab-case.function.d.ts +1 -1
- package/dist/cjs/lib/functions/money.function.d.ts +1 -1
- package/dist/cjs/lib/functions/properties-to-array.function.d.ts +1 -1
- package/dist/cjs/lib/functions/properties-to-array.function.js +1 -1
- package/dist/cjs/lib/functions/remove-alpha-chars.function.d.ts +1 -1
- package/dist/cjs/lib/functions/remove-alpha-chars.function.js +1 -1
- package/dist/cjs/lib/functions/snake-case.function.d.ts +1 -1
- package/dist/cjs/lib/functions/to-words.function.d.ts +1 -1
- package/dist/cjs/lib/functions/to-words.function.js +1 -1
- package/dist/cjs/lib/functions/unicode-words.const.d.ts +1 -1
- package/dist/cjs/lib/functions/upper-first.function.d.ts +1 -1
- package/dist/cjs/lib/functions/words.function.d.ts +1 -1
- package/dist/esm/lib/functions/kebab-case.function.d.ts +1 -1
- package/dist/esm/lib/functions/money.function.d.ts +1 -1
- package/dist/esm/lib/functions/properties-to-array.function.d.ts +1 -1
- package/dist/esm/lib/functions/properties-to-array.function.js +1 -1
- package/dist/esm/lib/functions/remove-alpha-chars.function.d.ts +1 -1
- package/dist/esm/lib/functions/remove-alpha-chars.function.js +1 -1
- package/dist/esm/lib/functions/snake-case.function.d.ts +1 -1
- package/dist/esm/lib/functions/to-words.function.d.ts +1 -1
- package/dist/esm/lib/functions/to-words.function.js +1 -1
- package/dist/esm/lib/functions/unicode-words.const.d.ts +1 -1
- package/dist/esm/lib/functions/upper-first.function.d.ts +1 -1
- package/dist/esm/lib/functions/words.function.d.ts +1 -1
- package/dist/types/lib/functions/kebab-case.function.d.ts +1 -1
- package/dist/types/lib/functions/money.function.d.ts +1 -1
- package/dist/types/lib/functions/properties-to-array.function.d.ts +1 -1
- package/dist/types/lib/functions/remove-alpha-chars.function.d.ts +1 -1
- package/dist/types/lib/functions/snake-case.function.d.ts +1 -1
- package/dist/types/lib/functions/to-words.function.d.ts +1 -1
- package/dist/types/lib/functions/unicode-words.const.d.ts +1 -1
- package/dist/types/lib/functions/upper-first.function.d.ts +1 -1
- package/dist/types/lib/functions/words.function.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function kebabCase(string:
|
|
1
|
+
export declare function kebabCase(string: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function money(rawValue: number | string): string;
|
|
1
|
+
export declare function money(rawValue: number | string): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function propertiesToArray(obj: any): any;
|
|
1
|
+
export declare function propertiesToArray(obj: Record<string, any>): any;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.propertiesToArray = propertiesToArray;
|
|
5
5
|
function propertiesToArray(obj) {
|
|
6
|
-
const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
|
|
6
|
+
const isObject = (val) => val && typeof val === 'object' && !Array.isArray(val);
|
|
7
7
|
const addDelimiter = (a, b) => a ? `${a}.${b}` : b;
|
|
8
8
|
const paths = (obj = {}, head = '') => {
|
|
9
9
|
return Object.entries(obj)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function removeAlphaChars(input?: string | number): string;
|
|
1
|
+
export declare function removeAlphaChars(input?: string | number): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function toWords(input:
|
|
1
|
+
export declare function toWords(input: number | string): string;
|
|
@@ -20,7 +20,7 @@ const TENTHS_LESS_THAN_HUNDRED = [
|
|
|
20
20
|
];
|
|
21
21
|
function toWords(input) {
|
|
22
22
|
let words;
|
|
23
|
-
const number = (0, remove_alpha_chars_function_1.removeAlphaChars)(input);
|
|
23
|
+
const number = (0, remove_alpha_chars_function_1.removeAlphaChars)(input) || '0';
|
|
24
24
|
const num = parseInt(number, 10);
|
|
25
25
|
if (!isFinite(num)) {
|
|
26
26
|
throw new TypeError('Not a finite number: ' + number + ' (' + typeof number + ')');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function upperFirst(string:
|
|
1
|
+
export declare function upperFirst(string: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function kebabCase(string:
|
|
1
|
+
export declare function kebabCase(string: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function money(rawValue: number | string): string;
|
|
1
|
+
export declare function money(rawValue: number | string): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function propertiesToArray(obj: any): any;
|
|
1
|
+
export declare function propertiesToArray(obj: Record<string, any>): any;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.propertiesToArray = propertiesToArray;
|
|
5
5
|
function propertiesToArray(obj) {
|
|
6
|
-
const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
|
|
6
|
+
const isObject = (val) => val && typeof val === 'object' && !Array.isArray(val);
|
|
7
7
|
const addDelimiter = (a, b) => a ? `${a}.${b}` : b;
|
|
8
8
|
const paths = (obj = {}, head = '') => {
|
|
9
9
|
return Object.entries(obj)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function removeAlphaChars(input?: string | number): string;
|
|
1
|
+
export declare function removeAlphaChars(input?: string | number): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function toWords(input:
|
|
1
|
+
export declare function toWords(input: number | string): string;
|
|
@@ -20,7 +20,7 @@ const TENTHS_LESS_THAN_HUNDRED = [
|
|
|
20
20
|
];
|
|
21
21
|
function toWords(input) {
|
|
22
22
|
let words;
|
|
23
|
-
const number = (0, remove_alpha_chars_function_1.removeAlphaChars)(input);
|
|
23
|
+
const number = (0, remove_alpha_chars_function_1.removeAlphaChars)(input) || '0';
|
|
24
24
|
const num = parseInt(number, 10);
|
|
25
25
|
if (!isFinite(num)) {
|
|
26
26
|
throw new TypeError('Not a finite number: ' + number + ' (' + typeof number + ')');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function upperFirst(string:
|
|
1
|
+
export declare function upperFirst(string: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function kebabCase(string:
|
|
1
|
+
export declare function kebabCase(string: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function money(rawValue: number | string): string;
|
|
1
|
+
export declare function money(rawValue: number | string): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function propertiesToArray(obj: any): any;
|
|
1
|
+
export declare function propertiesToArray(obj: Record<string, any>): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function removeAlphaChars(input?: string | number): string;
|
|
1
|
+
export declare function removeAlphaChars(input?: string | number): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function toWords(input:
|
|
1
|
+
export declare function toWords(input: number | string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function upperFirst(string:
|
|
1
|
+
export declare function upperFirst(string: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onivoro/isomorphic-common",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "git+https://github.com/onivoro/isomorphic-common.git"
|
|
6
6
|
},
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"module": "commonjs"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@onivoro/cli": "^22.0.
|
|
33
|
+
"@onivoro/cli": "^22.0.8",
|
|
34
34
|
"@types/jest": "*",
|
|
35
35
|
"typescript": "*"
|
|
36
36
|
},
|