-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsanitize-filename.js
4 lines (4 loc) · 2.01 KB
/
sanitize-filename.js
1
2
3
4
/**
* Original file: /npm/[email protected]/index.js
*/
var S=Object.create;var x=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var l=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),$=(r,e)=>{for(var t in e)x(r,t,{get:e[t],enumerable:!0})},v=(r,e,t,u)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of A(e))!I.call(r,n)&&n!==t&&x(r,n,{get:()=>e[n],enumerable:!(u=q(e,n))||u.enumerable});return r},s=(r,e,t)=>(v(r,e,"default"),t&&v(t,e,"default")),d=(r,e,t)=>(t=r!=null?S(E(r)):{},v(e||!r||!r.__esModule?x(t,"default",{value:r,enumerable:!0}):t,r));var p=l((O,g)=>{"use strict";function z(r){return r>=55296&&r<=56319}function B(r){return r>=56320&&r<=57343}g.exports=function(e,t,u){if(typeof t!="string")throw new Error("Input must be string");for(var n=t.length,a=0,o,i,f=0;f<n;f+=1){if(o=t.charCodeAt(f),i=t[f],z(o)&&B(t.charCodeAt(f+1))&&(f+=1,i+=t[f]),a+=e(i),a===u)return t.slice(0,f+1);if(a>u)return t.slice(0,f-i.length+1)}return t}});var L=l((Q,w)=>{"use strict";function H(r){return r>=55296&&r<=56319}function T(r){return r>=56320&&r<=57343}w.exports=function(e){if(typeof e!="string")throw new Error("Input must be string");for(var t=e.length,u=0,n=null,a=null,o=0;o<t;o++)n=e.charCodeAt(o),T(n)?a!=null&&H(a)?u+=1:u+=3:n<=127?u+=1:n>=128&&n<=2047?u+=2:n>=2048&&n<=65535&&(u+=3),a=n;return u}});var R=l((U,b)=>{"use strict";var j=p(),k=L();b.exports=j.bind(null,k)});var h=l((V,y)=>{"use strict";var D=R(),F=/[\/\?<>\\:\*\|"]/g,G=/[\x00-\x1f\x80-\x9f]/g,J=/^\.+$/,K=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,M=/[\. ]+$/;function m(r,e){if(typeof r!="string")throw new Error("Input must be string");var t=r.replace(F,e).replace(G,e).replace(J,e).replace(K,e).replace(M,e);return D(t,255)}y.exports=function(r,e){var t=e&&e.replacement||"",u=m(r,t);return t===""?u:m(u,"")}});var c={};$(c,{default:()=>C.default});s(c,d(h()));var C=d(h());var export_default=C.default;export{export_default as default};