[oden] IO: Load Strings

It's useful. The stock JS way is bad.
This commit is contained in:
John Doty 2023-07-08 17:55:37 -07:00
parent 89045ccbcc
commit 17c701a7d6
4 changed files with 42 additions and 3 deletions

View file

@ -6,6 +6,12 @@ import * as core from "io-core";
* @param path The path of the file to load.
* @returns The contents of the file.
*/
export function load(path: string): Promise<ArrayBuffer> {
return core.load(path);
}
export const load = core.load;
/**
* Load the specified file into memory as a string.
*
* @param path The path of the file to load.
* @returns The contents of the file decoded from utf-8.
*/
export const load_string = core.load_string;