UNPKG

onepage

Version:

Static one-page site generator

18 lines (16 loc) 335 B
var tools = { trim: function(str){ str = str.replace(/^\s+/, ''); for (var i = str.length - 1; i >= 0; i--) { if (/\S/.test(str.charAt(i))) { str = str.substring(0, i + 1); break; } } return str; }, getDirSeparator: function(){ return process.platform == 'win32' ? '\\' : '/'; } }; module.exports = tools;