UNPKG

385 BJavaScriptView Raw
1/* ! The MIT License (MIT) Copyright (c) 2014 Scott Corgan */
2
3// This is adopted from https://github.com/scottcorgan/glob-slash/
4
5const path = require('path');
6const normalize = value => path.posix.normalize(path.posix.join('/', value));
7
8module.exports = value => (value.charAt(0) === '!' ? `!${normalize(value.substr(1))}` : normalize(value));
9module.exports.normalize = normalize;