How to use the @phensley/cldr-utils.Checksum function in @phensley/cldr-utils

To help you get started, we’ve selected a few @phensley/cldr-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github phensley / cldr-engine / packages / cldr-core / src / resource / checksum.ts View on Github external
export const checksumIndices = (version: string, map: KeyIndexMap): string => {
  const c = new Checksum();
  c.update(version);

  // Visit map keys in sorted order
  const keys = Object.keys(map).sort();
  for (const key of keys) {
    c.update(key);

    // Mapped values must be visited in their existing order.
    for (const val of map[key].keys) {
      c.update(val);
    }
  }
  return c.get().toString(16);
};

@phensley/cldr-utils

Utilities for cldr-engine packages

Apache-2.0
Latest version published 17 days ago

Package Health Score

60 / 100
Full package analysis

Similar packages