UNPKG

mdict

Version:

node.js mdict (*.mdx, *.mdd) file reader

14 lines (10 loc) 382 B
exports.REGEXP_STRIPKEY = { 'mdx' : /[()., '/\\@_-]()/g, 'mdd' : /([.][^.]*$)|[()., '/\\@_-]/g // strip '.' before file extension that is keeping the last period }; exports.log = function() { console.log.apply(console, [].slice.apply(arguments)); }; exports.getExtension = function (filename, defaultExt) { return /(?:\.([^.]+))?$/.exec(filename)[1] || defaultExt; };