Rocky_Mountain_Vending/.pnpm-store/v10/files/f6/5d2dd13639d5c7b2cb7a339d81dbd48254f78b0dd53847e3854f87487bcf2b1e87083ee7a2e4aad26518fcff4d40ba4d5451d5b8fccd34c3d5516a2669173a
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

112 lines
3.1 KiB
Text

import {
createEqualityComparatorConfig,
createEqualityComparator,
createInternalEqualityComparator,
createIsEqual,
} from './comparator.js';
import type { CustomEqualCreatorOptions } from './internalTypes.js';
import { sameValueZeroEqual } from './utils.js';
export { sameValueZeroEqual };
export type {
AnyEqualityComparator,
Cache,
CircularState,
ComparatorConfig,
CreateCustomComparatorConfig,
CreateState,
CustomEqualCreatorOptions,
DefaultState,
Dictionary,
EqualityComparator,
EqualityComparatorCreator,
InternalEqualityComparator,
PrimitiveWrapper,
State,
TypeEqualityComparator,
TypedArray,
} from './internalTypes.js';
/**
* Whether the items passed are deeply-equal in value.
*/
export const deepEqual = createCustomEqual();
/**
* Whether the items passed are deeply-equal in value based on strict comparison.
*/
export const strictDeepEqual = createCustomEqual({ strict: true });
/**
* Whether the items passed are deeply-equal in value, including circular references.
*/
export const circularDeepEqual = createCustomEqual({ circular: true });
/**
* Whether the items passed are deeply-equal in value, including circular references,
* based on strict comparison.
*/
export const strictCircularDeepEqual = createCustomEqual({
circular: true,
strict: true,
});
/**
* Whether the items passed are shallowly-equal in value.
*/
export const shallowEqual = createCustomEqual({
createInternalComparator: () => sameValueZeroEqual,
});
/**
* Whether the items passed are shallowly-equal in value based on strict comparison
*/
export const strictShallowEqual = createCustomEqual({
strict: true,
createInternalComparator: () => sameValueZeroEqual,
});
/**
* Whether the items passed are shallowly-equal in value, including circular references.
*/
export const circularShallowEqual = createCustomEqual({
circular: true,
createInternalComparator: () => sameValueZeroEqual,
});
/**
* Whether the items passed are shallowly-equal in value, including circular references,
* based on strict comparison.
*/
export const strictCircularShallowEqual = createCustomEqual({
circular: true,
createInternalComparator: () => sameValueZeroEqual,
strict: true,
});
/**
* Create a custom equality comparison method.
*
* This can be done to create very targeted comparisons in extreme hot-path scenarios
* where the standard methods are not performant enough, but can also be used to provide
* support for legacy environments that do not support expected features like
* `RegExp.prototype.flags` out of the box.
*/
export function createCustomEqual<Meta = undefined>(
options: CustomEqualCreatorOptions<Meta> = {},
) {
const {
circular = false,
createInternalComparator: createCustomInternalComparator,
createState,
strict = false,
} = options;
const config = createEqualityComparatorConfig<Meta>(options);
const comparator = createEqualityComparator(config);
const equals = createCustomInternalComparator
? createCustomInternalComparator(comparator)
: createInternalEqualityComparator(comparator);
return createIsEqual({ circular, comparator, createState, equals, strict });
}