UNPKG

itk-wasm

Version:

High-performance spatial analysis in a web browser, Node.js, and reproducible execution across programming languages and hardware architectures.

15 lines (12 loc) 395 B
import path from 'path' import { fileURLToPath } from 'url' function bindgenResource(filePath) { const currentScriptPath = path.dirname(fileURLToPath(import.meta.url)) const resourcesDir = path.join(currentScriptPath, 'resources') const resourceFilePath = path.join( resourcesDir, filePath.split('/').join(path.sep) ) return resourceFilePath } export default bindgenResource