refkey
Create a refkey for the provided arguments. Passing no arguments returns a fresh refkey that is guaranteed to be unique. Otherwise, the arguments passed will be used to create a refkey for those values. Providing the same arguments will always return the same refkey.
import { refkey } from "@alloy-js/core";
function refkey(...args: unknown[]): Refkey;
Parameters
args |
|
Returns
Refkey
Remarks
Values are compared using the SameValueZero algorithm, which considers
objects the same if they are reference identical, and primitives the same if
they are the same value, with the exception of NaN
, which is always considered
equal to other NaN
values, and -0
, which is considered identical to +0