Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fastkit/helpers

Package Overview
Dependencies
Maintainers
1
Versions
204
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastkit/helpers - npm Package Compare versions

Comparing version 0.6.20 to 0.6.28

28

dist/helpers.cjs.js

@@ -126,2 +126,29 @@ 'use strict';

}
/**
* @see: https://github.com/vuejs/vue-router/blob/c69ff7bd60228fb79acd764c3fdae91015a49103/src/util/route.js#L96
*/
function isObjectEqual(a = {}, b) {
// handle null value #1566
if (!a || !b)
return a === b;
if (!isObject(b))
return false;
const aKeys = Object.keys(a);
const bKeys = Object.keys(b);
if (aKeys.length !== bKeys.length) {
return false;
}
return aKeys.every((key) => {
const aVal = a[key];
const bVal = b[key];
// query values can be null and undefined
if (aVal == null || bVal == null)
return aVal === bVal;
// check nested equality
if (typeof aVal === 'object' && typeof bVal === 'object') {
return isObjectEqual(aVal, bVal);
}
return String(aVal) === String(bVal);
});
}

@@ -660,2 +687,3 @@ function flattenRecursiveArray(source) {

exports.isObject = isObject;
exports.isObjectEqual = isObjectEqual;
exports.isPromise = isPromise;

@@ -662,0 +690,0 @@ exports.isSameFlattendComparatorCondition = isSameFlattendComparatorCondition;

@@ -126,2 +126,29 @@ 'use strict';

}
/**
* @see: https://github.com/vuejs/vue-router/blob/c69ff7bd60228fb79acd764c3fdae91015a49103/src/util/route.js#L96
*/
function isObjectEqual(a = {}, b) {
// handle null value #1566
if (!a || !b)
return a === b;
if (!isObject(b))
return false;
const aKeys = Object.keys(a);
const bKeys = Object.keys(b);
if (aKeys.length !== bKeys.length) {
return false;
}
return aKeys.every((key) => {
const aVal = a[key];
const bVal = b[key];
// query values can be null and undefined
if (aVal == null || bVal == null)
return aVal === bVal;
// check nested equality
if (typeof aVal === 'object' && typeof bVal === 'object') {
return isObjectEqual(aVal, bVal);
}
return String(aVal) === String(bVal);
});
}

@@ -660,2 +687,3 @@ function flattenRecursiveArray(source) {

exports.isObject = isObject;
exports.isObjectEqual = isObjectEqual;
exports.isPromise = isPromise;

@@ -662,0 +690,0 @@ exports.isSameFlattendComparatorCondition = isSameFlattendComparatorCondition;

@@ -154,2 +154,7 @@ /// <reference types="node" />

/**
* @see: https://github.com/vuejs/vue-router/blob/c69ff7bd60228fb79acd764c3fdae91015a49103/src/util/route.js#L96
*/
export declare function isObjectEqual<T extends any>(a: T | undefined, b: unknown): b is T;
export declare function isPromise<T = any>(obj: any): obj is Promise<T>;

@@ -156,0 +161,0 @@

29

dist/helpers.esm-bundler.js

@@ -122,2 +122,29 @@ function toInt(value) {

}
/**
* @see: https://github.com/vuejs/vue-router/blob/c69ff7bd60228fb79acd764c3fdae91015a49103/src/util/route.js#L96
*/
function isObjectEqual(a = {}, b) {
// handle null value #1566
if (!a || !b)
return a === b;
if (!isObject(b))
return false;
const aKeys = Object.keys(a);
const bKeys = Object.keys(b);
if (aKeys.length !== bKeys.length) {
return false;
}
return aKeys.every((key) => {
const aVal = a[key];
const bVal = b[key];
// query values can be null and undefined
if (aVal == null || bVal == null)
return aVal === bVal;
// check nested equality
if (typeof aVal === 'object' && typeof bVal === 'object') {
return isObjectEqual(aVal, bVal);
}
return String(aVal) === String(bVal);
});
}

@@ -629,2 +656,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, isPromise, isSameFlattendComparatorCondition, isSet, isString, nilToEmptyString, notEmptyValue, 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, objectIncludes, ownerDocument, ownerWindow, parseDateInput, pushDynamicStyle, range, resolveDebounceSettings, safeGetTimeByDateSource, safeJSONSerializer, safeJSONStringify, safeRemainderOperation, toComparableNumbers, toFloat, toHalfWidth, toInt, toNumber, toSingleSpace, traverseAndFlattenComparatorCondition };

2

package.json
{
"name": "@fastkit/helpers",
"version": "0.6.20",
"version": "0.6.28",
"description": "@fastkit/helpers",

@@ -5,0 +5,0 @@ "buildOptions": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc