ts-commons
Advanced tools
Comparing version 1.0.39 to 1.0.40
@@ -11,2 +11,5 @@ import { ArrayUtils } from "./utils/array.utils"; | ||
import { IOUtils } from "./utils/io.utils"; | ||
export { ObjectUtils, StringUtils, NumberUtils, DateUtils, RegexUtils, HttpUtils, ArrayUtils, ThreadUtils, ActionUtils, IOUtils, }; | ||
declare const hasValue: typeof ObjectUtils.hasValue; | ||
declare const isNullOrUndefined: typeof ObjectUtils.isNullOrUndefined; | ||
declare const getOrDefault: typeof ObjectUtils.getOrDefault; | ||
export { ObjectUtils, StringUtils, NumberUtils, DateUtils, RegexUtils, HttpUtils, ArrayUtils, ThreadUtils, ActionUtils, IOUtils, hasValue, isNullOrUndefined, getOrDefault, }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.IOUtils = exports.ActionUtils = exports.ThreadUtils = exports.ArrayUtils = exports.HttpUtils = exports.RegexUtils = exports.DateUtils = exports.NumberUtils = exports.StringUtils = exports.ObjectUtils = void 0; | ||
exports.getOrDefault = exports.isNullOrUndefined = exports.hasValue = exports.IOUtils = exports.ActionUtils = exports.ThreadUtils = exports.ArrayUtils = exports.HttpUtils = exports.RegexUtils = exports.DateUtils = exports.NumberUtils = exports.StringUtils = exports.ObjectUtils = void 0; | ||
var array_utils_1 = require("./utils/array.utils"); | ||
@@ -24,2 +24,8 @@ Object.defineProperty(exports, "ArrayUtils", { enumerable: true, get: function () { return array_utils_1.ArrayUtils; } }); | ||
Object.defineProperty(exports, "IOUtils", { enumerable: true, get: function () { return io_utils_1.IOUtils; } }); | ||
var hasValue = object_utils_1.ObjectUtils.hasValue; | ||
exports.hasValue = hasValue; | ||
var isNullOrUndefined = object_utils_1.ObjectUtils.isNullOrUndefined; | ||
exports.isNullOrUndefined = isNullOrUndefined; | ||
var getOrDefault = object_utils_1.ObjectUtils.getOrDefault; | ||
exports.getOrDefault = getOrDefault; | ||
//# sourceMappingURL=index.js.map |
@@ -101,4 +101,2 @@ export declare class ObjectUtils { | ||
static getProperty3<T, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2]>(obj: T, key1: K1, key2: K2, key3: K3, defaultValue?: T[K1][K2][K3]): T[K1][K2][K3]; | ||
static getProperty4<T, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], K4 extends keyof T[K1][K2][K3]>(obj: T, key1: K1, key2: K2, key3: K3, key4: K4, defaultValue?: T[K1][K2][K3][K4]): T[K1][K2][K3][K4]; | ||
static getProperty5<T, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], K4 extends keyof T[K1][K2][K3], K5 extends keyof T[K1][K2][K3][K4]>(obj: T, key1: K1, key2: K2, key3: K3, key4: K4, key5: K5, defaultValue?: T[K1][K2][K3][K4][K5]): T[K1][K2][K3][K4][K5]; | ||
/** | ||
@@ -151,3 +149,2 @@ * set property to object. | ||
static getOrDefault<T>(value1: T, value2: T, value3: T, defaultValue: NonNullable<T>): NonNullable<T>; | ||
static getOrDefault<T>(value1: T, value2: T, value3: T, defaultValue: NonNullable<T>): NonNullable<T>; | ||
/** | ||
@@ -154,0 +151,0 @@ * Indicating whether the current object has a value. |
@@ -148,16 +148,2 @@ "use strict"; | ||
}; | ||
ObjectUtils.getProperty4 = function (obj, key1, key2, key3, key4, defaultValue) { | ||
var p = this.getProperty3(obj, key1, key2, key3); | ||
if (ObjectUtils.isNullOrUndefined(p)) { | ||
return defaultValue; | ||
} | ||
return p[key4]; | ||
}; | ||
ObjectUtils.getProperty5 = function (obj, key1, key2, key3, key4, key5, defaultValue) { | ||
var p = this.getProperty4(obj, key1, key2, key3, key4); | ||
if (ObjectUtils.isNullOrUndefined(p)) { | ||
return defaultValue; | ||
} | ||
return p[key5]; | ||
}; | ||
/** | ||
@@ -164,0 +150,0 @@ * set property to object. |
{ | ||
"name": "ts-commons", | ||
"version": "1.0.39", | ||
"version": "1.0.40", | ||
"description": "common methods for typescript", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
131504
2325