/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { brand } from "../../util/index.js";
/**
 * Compares two {@link LocalNodeKey}s.
 * All {@link LocalNodeKey}s retrieved from a single SharedTree client can be totally ordered using this comparator.
 * @param a - the first key to compare
 * @param b - the second key to compare
 * @returns `0` if `a` and `b` are the same key, otherwise `-1` if `a` is ordered before `b` or `1` if `a` is ordered after `b`.
 */
export function compareLocalNodeKeys(a, b) {
    return a === b ? 0 : a > b ? 1 : -1;
}
/**
 * The TreeNodeSchemaIdentifier for node keys.
 * @privateRemarks TODO: Come up with a unified and collision-resistant naming schema for types defined by the system.
 * For now, we'll use `__` to reduce the change of collision, since this is what other internal properties use in Fluid.
 */
export const nodeKeyTreeIdentifier = brand("com.fluidframework.nodeKey.NodeKey");
//# sourceMappingURL=nodeKey.js.map