Skip to main content
The Deno 2 Release Candidate is here
Learn more
class ImporterUtil
import { ImporterUtil } from "https://deno.land/x/sptaki@1.2.0/utils/ImporterUtil.d.ts";

Constructors

new
ImporterUtil(vfs: VFS, jsonUtil: JsonUtil)

Properties

protected
jsonUtil: JsonUtil
protected
vfs: VFS

Methods

protected
placeObject<T>(
fileDeserialized: any,
strippedFilePath: string,
result: T,
strippablePath: string,
): void
loadAsync<T>(
filepath: string,
strippablePath?: string,
onReadCallback?: (fileWithPath: string, data: string) => void,
onObjectDeserialized?: (fileWithPath: string, object: any) => void,
): Promise<T>
loadRecursive<T>(
filepath: string,
onReadCallback?: (fileWithPath: string, data: string) => void,
onObjectDeserialized?: (fileWithPath: string, object: any) => void,
): T

Load files into js objects recursively (synchronous)

loadRecursiveAsync<T>(
filepath: string,
onReadCallback?: (fileWithPath: string, data: string) => void,
onObjectDeserialized?: (fileWithPath: string, object: any) => void,
): Promise<T>

Load files into js objects recursively (asynchronous)