Utilities for map projections.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

json.ts 225 B

1234567
  1. import { readFile } from 'fs/promises';
  2. export const read = async <T>(path: string) => {
  3. const jsonBuffer = await readFile(path);
  4. const jsonString = jsonBuffer.toString('utf-8');
  5. return JSON.parse(jsonString) as T;
  6. };