-
Notifications
You must be signed in to change notification settings - Fork 0
/
path.min.js
2 lines (2 loc) · 3.62 KB
/
path.min.js
1
2
/** 'path' nodejs module minified for AMD, CommonJS & `window.path`. browserify v3.46.1 **/
!function(n){if("object"==typeof exports)module.exports=n();else if("function"==typeof define&&define.amd)define(n);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.path=n()}}(function(){return function n(e,r,t){function o(u,s){if(!r[u]){if(!e[u]){var f="function"==typeof require&&require;if(!s&&f)return f(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var a=r[u]={exports:{}};e[u][0].call(a.exports,function(n){var r=e[u][1][n];return o(r?r:n)},a,a.exports,n,e,r,t)}return r[u].exports}for(var i="function"==typeof require&&require,u=0;u<t.length;u++)o(t[u]);return o}({1:[function(n,e,r){(function(n){function e(n,e){for(var r=0,t=n.length-1;t>=0;t--){var o=n[t];"."===o?n.splice(t,1):".."===o?(n.splice(t,1),r++):r&&(n.splice(t,1),r--)}if(e)for(;r--;r)n.unshift("..");return n}function t(n,e){if(n.filter)return n.filter(e);for(var r=[],t=0;t<n.length;t++)e(n[t],t,n)&&r.push(n[t]);return r}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(n){return o.exec(n).slice(1)};r.resolve=function(){for(var r="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var u=i>=0?arguments[i]:n.cwd();if("string"!=typeof u)throw new TypeError("Arguments to path.resolve must be strings");u&&(r=u+"/"+r,o="/"===u.charAt(0))}return r=e(t(r.split("/"),function(n){return!!n}),!o).join("/"),(o?"/":"")+r||"."},r.normalize=function(n){var o=r.isAbsolute(n),i="/"===u(n,-1);return n=e(t(n.split("/"),function(n){return!!n}),!o).join("/"),n||o||(n="."),n&&i&&(n+="/"),(o?"/":"")+n},r.isAbsolute=function(n){return"/"===n.charAt(0)},r.join=function(){var n=Array.prototype.slice.call(arguments,0);return r.normalize(t(n,function(n){if("string"!=typeof n)throw new TypeError("Arguments to path.join must be strings");return n}).join("/"))},r.relative=function(n,e){function t(n){for(var e=0;e<n.length&&""===n[e];e++);for(var r=n.length-1;r>=0&&""===n[r];r--);return e>r?[]:n.slice(e,r-e+1)}n=r.resolve(n).substr(1),e=r.resolve(e).substr(1);for(var o=t(n.split("/")),i=t(e.split("/")),u=Math.min(o.length,i.length),s=u,f=0;u>f;f++)if(o[f]!==i[f]){s=f;break}for(var a=[],f=s;f<o.length;f++)a.push("..");return a=a.concat(i.slice(s)),a.join("/")},r.sep="/",r.delimiter=":",r.dirname=function(n){var e=i(n),r=e[0],t=e[1];return r||t?(t&&(t=t.substr(0,t.length-1)),r+t):"."},r.basename=function(n,e){var r=i(n)[2];return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},r.extname=function(n){return i(n)[3]};var u="b"==="ab".substr(-1)?function(n,e,r){return n.substr(e,r)}:function(n,e,r){return 0>e&&(e=n.length+e),n.substr(e,r)}}).call(this,n("+xKvab"))},{"+xKvab":2}],2:[function(n,e){function r(){}var t=e.exports={};t.nextTick=function(){var n="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(n)return function(n){return window.setImmediate(n)};if(e){var r=[];return window.addEventListener("message",function(n){var e=n.source;if((e===window||null===e)&&"process-tick"===n.data&&(n.stopPropagation(),r.length>0)){var t=r.shift();t()}},!0),function(n){r.push(n),window.postMessage("process-tick","*")}}return function(n){setTimeout(n,0)}}(),t.title="browser",t.browser=!0,t.env={},t.argv=[],t.on=r,t.addListener=r,t.once=r,t.off=r,t.removeListener=r,t.removeAllListeners=r,t.emit=r,t.binding=function(){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(){throw new Error("process.chdir is not supported")}},{}],3:[function(n,e){e.exports=n("path")},{path:1}]},{},[3])(3)});