astro-ghostcms/.pnpm-store/v3/files/c5/5697322e41646b48fe293abf03d...

14 lines
389 B
Plaintext

'use strict';
const getEngine = require('./engine');
const defaults = require('./defaults');
module.exports = function(language, str, options) {
const opts = defaults(options);
const engine = getEngine(language, opts);
if (typeof engine.parse !== 'function') {
throw new TypeError('expected "' + language + '.parse" to be a function');
}
return engine.parse(str, opts);
};