Sha256: ec353c77caf9ff7fd3a157d2b32b767076127dfc0629ac10a7bcf58d3df46968
Contents?: true
Size: 505 Bytes
Versions: 59
Compression:
Stored size: 505 Bytes
Contents
/*! * normalize-path <https://github.com/jonschlinkert/normalize-path> * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */ var removeTrailingSeparator = require('remove-trailing-separator'); module.exports = function normalizePath(str, stripTrailing) { if (typeof str !== 'string') { throw new TypeError('expected a string'); } str = str.replace(/[\\\/]+/g, '/'); if (stripTrailing !== false) { str = removeTrailingSeparator(str); } return str; };
Version data entries
59 entries across 49 versions & 18 rubygems