UNPKG

opencv4nodejs

Version:

Asynchronous OpenCV 3.x nodejs bindings with JavaScript and TypeScript API.

14 lines (11 loc) 281 B
const fs = require('fs') const path = require('path') function resolvePath(filePath, file) { if (!filePath) { return undefined } return (file ? path.resolve(filePath, file) : path.resolve(filePath)).replace(/\\/g, '/') } module.exports = { resolvePath }