#

API Docs for: v3.16.0-alpha.2
Show: Inherited Protected Private Deprecated

# File: ../store/addon/-private/identifiers/is-stable-identifier.ts

    import { StableRecordIdentifier } from '../ts-interfaces/identifier';

    /**
      @module @ember-data/store
    */

    const IDENTIFIERS = new WeakMap();

    export default function isStableIdentifier(identifier: Object): identifier is StableRecordIdentifier {
      return IDENTIFIERS.has(identifier);
    }

    export function markStableIdentifier(identifier: Object) {
      IDENTIFIERS.set(identifier, 'is-identifier');
    }

    export function unmarkStableIdentifier(identifier: Object) {
      IDENTIFIERS.delete(identifier);
    }