uni-ticket-system/node_modules/licia/fileUrl.js

14 lines
308 B
JavaScript
Raw Normal View History

2023-12-05 02:11:10 +00:00
var normalizePath = require('./normalizePath');
exports = function(path) {
path = normalizePath(path);
if (path[0] !== '/') {
path = '/'.concat(path);
}
return encodeURI('file://'.concat(path)).replace(
/[?#]/g,
encodeURIComponent
);
};
module.exports = exports;