export function addressOf()

in src/private/uniqueid.ts [16:28]


export function addressOf(components: string[]) {
  const hash = crypto.createHash('sha1');
  for (const c of components) {
    // skip components called "Default" to enable refactorings
    if (c === HIDDEN_ID) { continue; }

    hash.update(c);
    hash.update('\n');
  }

  // prefix with "c8" so to ensure it starts with non-digit.
  return 'c8' + hash.digest('hex');
}