deno_hello/src/repository/locales.ts
2021-02-19 13:27:16 +01:00

9 lines
257 B
TypeScript

import { locales } from "./data.ts";
export const localesSize = Object.keys(locales).length;
/**
* Return a given locale identified by its id
* @param id unique identifier
*/
export const getLocaleById = (id: number) => Object.values(locales)[id - 1];