@fastkit/helpers
Advanced tools
Comparing version 0.6.44 to 0.6.45
@@ -159,2 +159,14 @@ 'use strict'; | ||
} | ||
function removeUndef(obj, deep) { | ||
return Object.keys(obj).reduce((result, key) => { | ||
let value = obj[key]; | ||
if (value !== undefined) { | ||
if (deep && value && typeof value === 'object') { | ||
value = removeUndef(value, true); | ||
} | ||
result[key] = value; | ||
} | ||
return result; | ||
}, {}); | ||
} | ||
@@ -707,2 +719,3 @@ function flattenRecursiveArray(source) { | ||
exports.range = range; | ||
exports.removeUndef = removeUndef; | ||
exports.resolveDebounceSettings = resolveDebounceSettings; | ||
@@ -709,0 +722,0 @@ exports.safeGetTimeByDateSource = safeGetTimeByDateSource; |
@@ -159,2 +159,14 @@ 'use strict'; | ||
} | ||
function removeUndef(obj, deep) { | ||
return Object.keys(obj).reduce((result, key) => { | ||
let value = obj[key]; | ||
if (value !== undefined) { | ||
if (deep && value && typeof value === 'object') { | ||
value = removeUndef(value, true); | ||
} | ||
result[key] = value; | ||
} | ||
return result; | ||
}, {}); | ||
} | ||
@@ -707,2 +719,3 @@ function flattenRecursiveArray(source) { | ||
exports.range = range; | ||
exports.removeUndef = removeUndef; | ||
exports.resolveDebounceSettings = resolveDebounceSettings; | ||
@@ -709,0 +722,0 @@ exports.safeGetTimeByDateSource = safeGetTimeByDateSource; |
@@ -238,2 +238,4 @@ /// <reference types="node" /> | ||
export declare function removeUndef<T extends Record<string, unknown>>(obj: T, deep?: boolean): T; | ||
export declare function resolveDebounceSettings<FN extends Debouncable = Debouncable>(fnOrSettings: FN | DebounceSettings<FN>, delayOrOptions?: number | DebounceOptions, immediateOption?: boolean): DebounceSettings<FN>; | ||
@@ -240,0 +242,0 @@ |
@@ -155,2 +155,14 @@ function toInt(value) { | ||
} | ||
function removeUndef(obj, deep) { | ||
return Object.keys(obj).reduce((result, key) => { | ||
let value = obj[key]; | ||
if (value !== undefined) { | ||
if (deep && value && typeof value === 'object') { | ||
value = removeUndef(value, true); | ||
} | ||
result[key] = value; | ||
} | ||
return result; | ||
}, {}); | ||
} | ||
@@ -662,2 +674,2 @@ function flattenRecursiveArray(source) { | ||
export { Cloner, DATE_INPUT_PRECISIONS, DATE_INPUT_RE, DefaultComparatorConditionName, IN_DOCUMENT, IN_WINDOW, addTransitionEvent, addTransitionendEvent, arrayRemove, attemptFocus, clone, consoleColorString, copyBuffer, createComparatorCondition, debounce, escapeRegExp, flattenComparatorCondition, flattenRecursiveArray, focusFirstDescendant, isArrayBufferView, isBuffer, isComparatorConditionalValue, isEmpty, isFocusable, isIterableObject, isMap, isObject, isObjectEqual, isPromise, isSameFlattendComparatorCondition, isSet, isString, nilToEmptyString, notEmptyValue, objectFromArray, objectIncludes, ownerDocument, ownerWindow, parseDateInput, pushDynamicStyle, range, resolveDebounceSettings, safeGetTimeByDateSource, safeJSONSerializer, safeJSONStringify, safeRemainderOperation, toComparableNumbers, toFloat, toHalfWidth, toInt, toNumber, toSingleSpace, traverseAndFlattenComparatorCondition }; | ||
export { Cloner, DATE_INPUT_PRECISIONS, DATE_INPUT_RE, DefaultComparatorConditionName, IN_DOCUMENT, IN_WINDOW, addTransitionEvent, addTransitionendEvent, arrayRemove, attemptFocus, clone, consoleColorString, copyBuffer, createComparatorCondition, debounce, escapeRegExp, flattenComparatorCondition, flattenRecursiveArray, focusFirstDescendant, isArrayBufferView, isBuffer, isComparatorConditionalValue, isEmpty, isFocusable, isIterableObject, isMap, isObject, isObjectEqual, isPromise, isSameFlattendComparatorCondition, isSet, isString, nilToEmptyString, notEmptyValue, objectFromArray, objectIncludes, ownerDocument, ownerWindow, parseDateInput, pushDynamicStyle, range, removeUndef, resolveDebounceSettings, safeGetTimeByDateSource, safeJSONSerializer, safeJSONStringify, safeRemainderOperation, toComparableNumbers, toFloat, toHalfWidth, toInt, toNumber, toSingleSpace, traverseAndFlattenComparatorCondition }; |
{ | ||
"name": "@fastkit/helpers", | ||
"version": "0.6.44", | ||
"version": "0.6.45", | ||
"description": "@fastkit/helpers", | ||
@@ -5,0 +5,0 @@ "buildOptions": { |
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
79805
2273