UNPKG

node-shntool

Version:

Node interface to shntool (http://www.etree.org/shnutils/shntool/)

22 lines 737 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const cp = require("child_process"); const globby = require("globby"); const config_1 = require("./config"); function shntool(args) { return cp.spawn('shntool', args, { detached: true }); } exports.shntool = shntool; async function audiofiles(src, opt) { const files = globby.sync(src, opt).filter((v) => { for (let i = 0; i < config_1.SUPPORTED_AUDIO_FILES.length; i++) { if (v.toLowerCase().endsWith(config_1.SUPPORTED_AUDIO_FILES[i])) { return true; } } return false; }); return files; } exports.audiofiles = audiofiles; //# sourceMappingURL=shntool.js.map