core-functions
Advanced tools
Comparing version 3.0.12 to 3.0.13
@@ -8,7 +8,7 @@ 'use strict'; | ||
*/ | ||
module.exports.defined = defined; | ||
module.exports.notDefined = notDefined; | ||
exports.defined = defined; | ||
exports.notDefined = notDefined; | ||
// noinspection JSDeprecatedSymbols | ||
module.exports.valueOf = valueOf; | ||
exports.valueOf = valueOf; | ||
@@ -15,0 +15,0 @@ /** |
@@ -19,7 +19,7 @@ "use strict"; | ||
// Error conversion functions | ||
module.exports.toAppError = toAppError; | ||
module.exports.toAppErrorForApiGateway = toAppErrorForApiGateway; | ||
module.exports.getHttpStatus = getHttpStatus; | ||
exports.toAppError = toAppError; | ||
exports.toAppErrorForApiGateway = toAppErrorForApiGateway; | ||
exports.getHttpStatus = getHttpStatus; | ||
module.exports.setTypeName = setTypeName; | ||
exports.setTypeName = setTypeName; | ||
@@ -35,3 +35,3 @@ /** A list of all of the 400-series HTTP status codes currently directly supported (and to be mapped on API Gateway). */ | ||
module.exports.supportedHttpStatusCodes = Object.freeze(supportedCodes); | ||
exports.supportedHttpStatusCodes = Object.freeze(supportedCodes); | ||
@@ -407,17 +407,17 @@ /** | ||
// Exports for each of the AppError "classes" and other related utility functions. | ||
module.exports.AppError = AppError; | ||
exports.AppError = AppError; | ||
// 400-series | ||
module.exports.BadRequest = BadRequest; | ||
module.exports.Unauthorized = Unauthorized; | ||
module.exports.Forbidden = Forbidden; | ||
module.exports.NotFound = NotFound; | ||
module.exports.RequestTimeout = RequestTimeout; | ||
module.exports.TooManyRequests = TooManyRequests; | ||
exports.BadRequest = BadRequest; | ||
exports.Unauthorized = Unauthorized; | ||
exports.Forbidden = Forbidden; | ||
exports.NotFound = NotFound; | ||
exports.RequestTimeout = RequestTimeout; | ||
exports.TooManyRequests = TooManyRequests; | ||
// 500-series | ||
module.exports.InternalServerError = InternalServerError; | ||
module.exports.BadGateway = BadGateway; | ||
module.exports.ServiceUnavailable = ServiceUnavailable; | ||
module.exports.GatewayTimeout = GatewayTimeout; | ||
exports.InternalServerError = InternalServerError; | ||
exports.BadGateway = BadGateway; | ||
exports.ServiceUnavailable = ServiceUnavailable; | ||
exports.GatewayTimeout = GatewayTimeout; | ||
@@ -424,0 +424,0 @@ function setTypeName(type) { |
@@ -6,6 +6,6 @@ /** | ||
*/ | ||
module.exports.distinct = distinct; | ||
module.exports.isDistinct = isDistinct; | ||
module.exports.isArrayOfType = isArrayOfType; | ||
module.exports.flatten = flatten; | ||
exports.distinct = distinct; | ||
exports.isDistinct = isDistinct; | ||
exports.isArrayOfType = isArrayOfType; | ||
exports.flatten = flatten; | ||
@@ -12,0 +12,0 @@ /** |
@@ -12,7 +12,7 @@ 'use strict'; | ||
*/ | ||
module.exports.toBase64 = toBase64; | ||
module.exports.fromBase64 = fromBase64; | ||
module.exports.toBase64FromUtf8 = toBase64FromUtf8; | ||
module.exports.toUtf8FromBase64 = toUtf8FromBase64; | ||
module.exports.isEncodableDecodable = isEncodableDecodable; | ||
exports.toBase64 = toBase64; | ||
exports.fromBase64 = fromBase64; | ||
exports.toBase64FromUtf8 = toBase64FromUtf8; | ||
exports.toUtf8FromBase64 = toUtf8FromBase64; | ||
exports.isEncodableDecodable = isEncodableDecodable; | ||
@@ -19,0 +19,0 @@ /** |
@@ -8,4 +8,4 @@ 'use strict'; | ||
*/ | ||
module.exports.isBoolean = isBoolean; | ||
module.exports.isTrueOrFalse = isTrueOrFalse; | ||
exports.isBoolean = isBoolean; | ||
exports.isTrueOrFalse = isTrueOrFalse; | ||
@@ -12,0 +12,0 @@ /** |
@@ -23,13 +23,13 @@ 'use strict'; | ||
// noinspection JSDeprecatedSymbols | ||
module.exports.copy = copy; | ||
module.exports.copyNamedProperties = copyNamedProperties; | ||
module.exports.copyDescriptor = copyDescriptor; | ||
exports.copy = copy; | ||
exports.copyNamedProperties = copyNamedProperties; | ||
exports.copyDescriptor = copyDescriptor; | ||
// Internal API | ||
module.exports.configureCopyContext = configureCopyContext; | ||
module.exports.isCopyableObject = isCopyableObject; | ||
module.exports.copyObject = copyObject; | ||
module.exports.createObject = createObject; | ||
module.exports.copyPropertyDescriptors = copyPropertyDescriptors; | ||
module.exports.copyPropertyDescriptor = copyPropertyDescriptor; | ||
exports.configureCopyContext = configureCopyContext; | ||
exports.isCopyableObject = isCopyableObject; | ||
exports.copyObject = copyObject; | ||
exports.createObject = createObject; | ||
exports.copyPropertyDescriptors = copyPropertyDescriptors; | ||
exports.copyPropertyDescriptor = copyPropertyDescriptor; | ||
@@ -36,0 +36,0 @@ /** |
34
dates.js
@@ -21,25 +21,25 @@ 'use strict'; | ||
// Regular expressions | ||
module.exports.simpleISODateTimeRegex = simpleISODateTimeRegex; | ||
module.exports.simpleISODateRegex = simpleISODateRegex; | ||
module.exports.extendedISODateTimeRegex = extendedISODateTimeRegex; | ||
module.exports.extendedISODateRegex = extendedISODateRegex; | ||
exports.simpleISODateTimeRegex = simpleISODateTimeRegex; | ||
exports.simpleISODateRegex = simpleISODateRegex; | ||
exports.extendedISODateTimeRegex = extendedISODateTimeRegex; | ||
exports.extendedISODateRegex = extendedISODateRegex; | ||
// Date string matching | ||
module.exports.isSimpleISODateTimeLike = isSimpleISODateTimeLike; | ||
module.exports.isSimpleISODateLike = isSimpleISODateLike; | ||
module.exports.isExtendedISODateTimeLike = isExtendedISODateTimeLike; | ||
module.exports.isExtendedISODateLike = isExtendedISODateLike; | ||
exports.isSimpleISODateTimeLike = isSimpleISODateTimeLike; | ||
exports.isSimpleISODateLike = isSimpleISODateLike; | ||
exports.isExtendedISODateTimeLike = isExtendedISODateTimeLike; | ||
exports.isExtendedISODateLike = isExtendedISODateLike; | ||
// Date matching | ||
module.exports.isSimpleISODateTime = isSimpleISODateTime; | ||
module.exports.isSimpleISODate = isSimpleISODate; | ||
module.exports.isExtendedISODateTime = isExtendedISODateTime; | ||
module.exports.isExtendedISODate = isExtendedISODate; | ||
exports.isSimpleISODateTime = isSimpleISODateTime; | ||
exports.isSimpleISODate = isSimpleISODate; | ||
exports.isExtendedISODateTime = isExtendedISODateTime; | ||
exports.isExtendedISODate = isExtendedISODate; | ||
// Conversion to Date | ||
module.exports.toSimpleISODateTime = toSimpleISODateTime; | ||
module.exports.toSimpleISODate = toSimpleISODate; | ||
module.exports.toDateTime = toDateTime; | ||
module.exports.toExtendedISODate = toExtendedISODate; | ||
module.exports.isValidDate = isValidDate; | ||
exports.toSimpleISODateTime = toSimpleISODateTime; | ||
exports.toSimpleISODate = toSimpleISODate; | ||
exports.toDateTime = toDateTime; | ||
exports.toExtendedISODate = toExtendedISODate; | ||
exports.isValidDate = isValidDate; | ||
@@ -46,0 +46,0 @@ /** |
@@ -8,5 +8,5 @@ 'use strict'; | ||
*/ | ||
module.exports.setTypeName = setTypeName; | ||
module.exports.prefixMessage = prefixMessage; | ||
module.exports.toJSON = toJSON; | ||
exports.setTypeName = setTypeName; | ||
exports.prefixMessage = prefixMessage; | ||
exports.toJSON = toJSON; | ||
@@ -32,3 +32,3 @@ /** | ||
} | ||
module.exports.FatalError = FatalError; | ||
exports.FatalError = FatalError; | ||
@@ -52,3 +52,3 @@ /** | ||
} | ||
module.exports.TransientError = TransientError; | ||
exports.TransientError = TransientError; | ||
@@ -72,3 +72,3 @@ /** | ||
} | ||
module.exports.TimeoutError = TimeoutError; | ||
exports.TimeoutError = TimeoutError; | ||
@@ -75,0 +75,0 @@ function prefixMessage(prefix, message) { |
@@ -24,7 +24,7 @@ 'use strict'; | ||
// Public API | ||
module.exports.merge = merge; | ||
exports.merge = merge; | ||
// // Internal API | ||
// module.exports.configureMergeContext = configureMergeContext; | ||
// module.exports.mergeObject = mergeObject; | ||
// exports.configureMergeContext = configureMergeContext; | ||
// exports.mergeObject = mergeObject; | ||
@@ -31,0 +31,0 @@ /** |
@@ -20,33 +20,33 @@ 'use strict'; | ||
*/ | ||
module.exports.isNumber = isNumber; | ||
module.exports.isFiniteNumber = isFiniteNumber; | ||
module.exports.isSpecialNumber = isSpecialNumber; | ||
module.exports.isNaN = isNaN; | ||
module.exports.isInteger = isInteger; | ||
module.exports.isSafeInteger = isSafeInteger; | ||
module.exports.toInteger = toInteger; | ||
exports.isNumber = isNumber; | ||
exports.isFiniteNumber = isFiniteNumber; | ||
exports.isSpecialNumber = isSpecialNumber; | ||
exports.isNaN = isNaN; | ||
exports.isInteger = isInteger; | ||
exports.isSafeInteger = isSafeInteger; | ||
exports.toInteger = toInteger; | ||
module.exports.integerRegex = integerRegex; | ||
module.exports.numberRegex = numberRegex; | ||
exports.integerRegex = integerRegex; | ||
exports.numberRegex = numberRegex; | ||
module.exports.isNumberLike = isNumberLike; | ||
module.exports.isIntegerLike = isIntegerLike; | ||
module.exports.isZeroLike = isZeroLike; | ||
exports.isNumberLike = isNumberLike; | ||
exports.isIntegerLike = isIntegerLike; | ||
exports.isZeroLike = isZeroLike; | ||
module.exports.toNumberLike = toNumberLike; | ||
exports.toNumberLike = toNumberLike; | ||
module.exports.toDecimalLike = toDecimalLike; | ||
module.exports.toDecimalLikeOrNaN = toDecimalLikeOrNaN; | ||
exports.toDecimalLike = toDecimalLike; | ||
exports.toDecimalLikeOrNaN = toDecimalLikeOrNaN; | ||
module.exports.toIntegerLike = toIntegerLike; | ||
module.exports.toIntegerLikeOrNaN = toIntegerLikeOrNaN; | ||
exports.toIntegerLike = toIntegerLike; | ||
exports.toIntegerLikeOrNaN = toIntegerLikeOrNaN; | ||
module.exports.toNumberOrIntegerLike = toNumberOrIntegerLike; | ||
exports.toNumberOrIntegerLike = toNumberOrIntegerLike; | ||
module.exports.removeLeadingZeroes = removeLeadingZeroes; | ||
module.exports.removeTrailingZeroes = removeTrailingZeroes; | ||
module.exports.zeroPadLeft = zeroPadLeft; | ||
module.exports.removeSignIfZero = removeSignIfZeroLike; | ||
exports.removeLeadingZeroes = removeLeadingZeroes; | ||
exports.removeTrailingZeroes = removeTrailingZeroes; | ||
exports.zeroPadLeft = zeroPadLeft; | ||
exports.removeSignIfZero = removeSignIfZeroLike; | ||
module.exports.nearlyEqual = nearlyEqual; | ||
exports.nearlyEqual = nearlyEqual; | ||
@@ -53,0 +53,0 @@ /** |
@@ -16,23 +16,23 @@ 'use strict'; | ||
*/ | ||
module.exports.isTypedArray = isTypedArray; | ||
module.exports.getPropertyNames = getPropertyNames; | ||
module.exports.getPropertySymbols = getPropertySymbols; | ||
module.exports.getPropertyKeys = getPropertyKeys; | ||
module.exports.getPropertyDescriptors = getPropertyDescriptors; | ||
module.exports.getPropertyValueByKeys = getPropertyValueByKeys; | ||
module.exports.getPropertyDescriptorByKeys = getPropertyDescriptorByKeys; | ||
module.exports.getPropertyValueByCompoundName = getPropertyValueByCompoundName; | ||
module.exports.hasOwnPropertyWithKeys = hasOwnPropertyWithKeys; | ||
module.exports.hasOwnPropertyWithCompoundName = hasOwnPropertyWithCompoundName; | ||
module.exports.toKeyValuePairs = toKeyValuePairs; | ||
module.exports.getOwnPropertyNamesRecursively = getOwnPropertyNamesRecursively; | ||
exports.isTypedArray = isTypedArray; | ||
exports.getPropertyNames = getPropertyNames; | ||
exports.getPropertySymbols = getPropertySymbols; | ||
exports.getPropertyKeys = getPropertyKeys; | ||
exports.getPropertyDescriptors = getPropertyDescriptors; | ||
exports.getPropertyValueByKeys = getPropertyValueByKeys; | ||
exports.getPropertyDescriptorByKeys = getPropertyDescriptorByKeys; | ||
exports.getPropertyValueByCompoundName = getPropertyValueByCompoundName; | ||
exports.hasOwnPropertyWithKeys = hasOwnPropertyWithKeys; | ||
exports.hasOwnPropertyWithCompoundName = hasOwnPropertyWithCompoundName; | ||
exports.toKeyValuePairs = toKeyValuePairs; | ||
exports.getOwnPropertyNamesRecursively = getOwnPropertyNamesRecursively; | ||
/** @deprecated use {@linkcode core-functions/any#valueOf} instead */ | ||
module.exports.valueOf = any.valueOf; | ||
exports.valueOf = any.valueOf; | ||
/** @deprecated */ | ||
module.exports.copy = copy; | ||
exports.copy = copy; | ||
/** @deprecated */ | ||
module.exports.copyNamedProperties = copyNamedProperties; | ||
exports.copyNamedProperties = copyNamedProperties; | ||
/** @deprecated */ | ||
module.exports.merge = merge; | ||
exports.merge = merge; | ||
@@ -43,3 +43,3 @@ /** | ||
* @returns {boolean} true if object is a subclass instance of TypedArray; false otherwise | ||
fffffffff */ | ||
*/ | ||
function isTypedArray(object) { | ||
@@ -46,0 +46,0 @@ return object instanceof Int8Array || object instanceof Uint8Array || object instanceof Uint8ClampedArray || |
{ | ||
"name": "core-functions", | ||
"version": "3.0.12", | ||
"version": "3.0.13", | ||
"description": "Core functions, utilities and classes for working with Node/JavaScript primitives and built-in objects, including strings, booleans, Promises, base 64, Arrays, Objects, standard AppErrors, etc.", | ||
@@ -5,0 +5,0 @@ "author": "Byron du Preez", |
@@ -14,21 +14,21 @@ 'use strict'; | ||
*/ | ||
module.exports.isPromise = isPromise; | ||
module.exports.isPromiseLike = isPromiseLike; | ||
module.exports.toPromise = toPromise; | ||
module.exports.wrap = wrap; | ||
module.exports.try = attempt; | ||
module.exports.delay = delay; | ||
module.exports.allOrOne = allOrOne; | ||
module.exports.every = every; | ||
module.exports.one = one; | ||
module.exports.flatten = flatten; | ||
module.exports.chain = chain; | ||
module.exports.installCancel = installCancel; | ||
module.exports.installCancelTimeout = installCancelTimeout; | ||
module.exports.avoidUnhandledPromiseRejectionWarning = avoidUnhandledPromiseRejectionWarning; | ||
exports.isPromise = isPromise; | ||
exports.isPromiseLike = isPromiseLike; | ||
exports.toPromise = toPromise; | ||
exports.wrap = wrap; | ||
exports.try = attempt; | ||
exports.delay = delay; | ||
exports.allOrOne = allOrOne; | ||
exports.every = every; | ||
exports.one = one; | ||
exports.flatten = flatten; | ||
exports.chain = chain; | ||
exports.installCancel = installCancel; | ||
exports.installCancelTimeout = installCancelTimeout; | ||
exports.avoidUnhandledPromiseRejectionWarning = avoidUnhandledPromiseRejectionWarning; | ||
/** @deprecated */ | ||
module.exports.wrapMethod = wrapMethod; | ||
exports.wrapMethod = wrapMethod; | ||
/** @deprecated */ | ||
module.exports.wrapNamedMethod = wrapNamedMethod; | ||
exports.wrapNamedMethod = wrapNamedMethod; | ||
@@ -67,3 +67,3 @@ /** | ||
module.exports.CancelledError = CancelledError; | ||
exports.CancelledError = CancelledError; | ||
@@ -84,3 +84,3 @@ class DelayCancelledError extends Error { | ||
module.exports.DelayCancelledError = DelayCancelledError; | ||
exports.DelayCancelledError = DelayCancelledError; | ||
@@ -87,0 +87,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
# core-functions v3.0.12 | ||
# core-functions v3.0.13 | ||
@@ -3,0 +3,0 @@ Core functions, utilities and classes for working with Node/JavaScript primitives and built-in objects, including |
## Changes | ||
### 3.0.13 | ||
- Changed almost all exports to modifications of the default `exports` object instead of replacing the default object | ||
### 3.0.12 | ||
@@ -4,0 +7,0 @@ - Changed all exports to modifications of the default `module.exports` object instead of replacing the default object |
@@ -15,16 +15,16 @@ 'use strict'; | ||
*/ | ||
module.exports.compareUndefinedOrNull = compareUndefinedOrNull; | ||
module.exports.compareNumbers = compareNumbers; | ||
module.exports.compareStrings = compareStrings; | ||
module.exports.compareBooleans = compareBooleans; | ||
module.exports.compareDates = compareDates; | ||
module.exports.compareIntegerLikes = compareIntegerLikes; | ||
module.exports.toSortable = toSortable; | ||
module.exports.sortSortable = sortSortable; | ||
exports.compareUndefinedOrNull = compareUndefinedOrNull; | ||
exports.compareNumbers = compareNumbers; | ||
exports.compareStrings = compareStrings; | ||
exports.compareBooleans = compareBooleans; | ||
exports.compareDates = compareDates; | ||
exports.compareIntegerLikes = compareIntegerLikes; | ||
exports.toSortable = toSortable; | ||
exports.sortSortable = sortSortable; | ||
module.exports.sortKeyValuePairsByKey = sortKeyValuePairsByKey; | ||
exports.sortKeyValuePairsByKey = sortKeyValuePairsByKey; | ||
// Deprecated | ||
/** @deprecated - use {@linkcode core-functions/any#notDefined} instead */ | ||
module.exports.isUndefinedOrNull = any.notDefined; | ||
exports.isUndefinedOrNull = any.notDefined; | ||
@@ -47,3 +47,3 @@ /** | ||
Object.freeze(SortType); | ||
module.exports.SortType = SortType; | ||
exports.SortType = SortType; | ||
@@ -50,0 +50,0 @@ /** |
@@ -12,14 +12,14 @@ 'use strict'; | ||
*/ | ||
module.exports.isString = isString; | ||
module.exports.isBlank = isBlank; | ||
module.exports.isNotBlank = isNotBlank; | ||
module.exports.trim = trim; | ||
module.exports.trimOrEmpty = trimOrEmpty; | ||
module.exports.stringify = stringify; | ||
module.exports.nthIndexOf = nthIndexOf; | ||
module.exports.toLowerCase = toLowerCase; | ||
module.exports.stringifyKeyValuePairs = stringifyKeyValuePairs; | ||
exports.isString = isString; | ||
exports.isBlank = isBlank; | ||
exports.isNotBlank = isNotBlank; | ||
exports.trim = trim; | ||
exports.trimOrEmpty = trimOrEmpty; | ||
exports.stringify = stringify; | ||
exports.nthIndexOf = nthIndexOf; | ||
exports.toLowerCase = toLowerCase; | ||
exports.stringifyKeyValuePairs = stringifyKeyValuePairs; | ||
/** @deprecated since 1.1.0, use trim instead */ | ||
module.exports.safeTrim = trim; | ||
exports.safeTrim = trim; | ||
@@ -26,0 +26,0 @@ // Attempts to get Node's util.js inspect function (if available) |
@@ -10,4 +10,4 @@ 'use strict'; | ||
*/ | ||
module.exports.cancelTimeout = cancelTimeout; | ||
module.exports.cancelInterval = cancelInterval; | ||
exports.cancelTimeout = cancelTimeout; | ||
exports.cancelInterval = cancelInterval; | ||
@@ -14,0 +14,0 @@ /** |
@@ -293,3 +293,3 @@ 'use strict'; | ||
module.exports.Try = Try; | ||
exports.Try = Try; | ||
@@ -356,3 +356,3 @@ /** | ||
module.exports.Success = Success; | ||
exports.Success = Success; | ||
@@ -411,2 +411,2 @@ /** | ||
module.exports.Failure = Failure; | ||
exports.Failure = Failure; |
@@ -191,8 +191,5 @@ /** | ||
* @property {boolean} deep - Executes a deep copy if deep is true, otherwise only does a shallow copy (defaults to shallow) | ||
* @property {boolean} deepMapKeys - Executes a deep copy of any Map's keys if true (AND if `deep` is true), otherwise only does a shallow copy (defaults to shallow) | ||
* Rationale: Generally don't want to copy a Map's Object keys, since a Map uses reference equality to compare keys | ||
* @property {boolean} deepMapValues - Executes a deep copy of any Map's values if true (AND if `deep` is true), otherwise only does a shallow copy (defaults to shallow) | ||
* Rationale: Generally don't want to copy a Map's Object values, since Maps are typically used to cache values for look-up purposes | ||
* @property {boolean} deepSets - Executes a deep copy of any Set's elements if true (AND if `deep` is true), otherwise only does a shallow copy (defaults to shallow) | ||
* Rationale: Generally don't want to copy a Set's Object elements, since a Set uses reference equality to compare elements & identify duplicates | ||
* @property {boolean} deepMapKeys - Executes a deep copy of any Map's keys if true (AND if `deep` is true), otherwise only does a shallow copy (defaults to shallow) Rationale: Generally don't want to copy a Map's Object keys, since a Map uses reference equality to compare keys | ||
* @property {boolean} deepMapValues - Executes a deep copy of any Map's values if true (AND if `deep` is true), otherwise only does a shallow copy (defaults to shallow) Rationale: Generally don't want to copy a Map's Object values, since Maps are typically used to cache values for look-up purposes | ||
* @property {boolean} deepSets - Executes a deep copy of any Set's elements if true (AND if `deep` is true), otherwise only does a shallow copy (defaults to shallow) Rationale: Generally don't want to copy a Set's Object elements, since a Set uses reference equality to compare elements & identify duplicates | ||
* @property {boolean} onlyEnumerable - whether to copy ONLY enumerable properties or ALL own properties (default is false, i.e. copy all) | ||
@@ -199,0 +196,0 @@ * @property {boolean} onlyValues - whether to copy ONLY property values & ignore descriptors (if true) or copy property descriptors (if false - default) |
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
954555
15246