UNPKG

@sap/cds

Version:

SAP Cloud Application Programming Model - CDS for Node.js

13 lines (11 loc) 307 B
const { join } = require('path') module.exports = new class { async default4(name) { const file = join(__dirname, name.replace(/\.\w+$/, '')) try { return structuredClone(require(file)) } catch { throw new Error(`ENOENT: Could not load schema '${name}' from ${file}`) } } }