-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.min.js
1 lines (1 loc) · 979 Bytes
/
index.min.js
1
(function(a,b){if('function'==typeof define)define(function(){return b});else if('undefined'!=typeof module&&module.exports)module.exports=b;else{var c=b,d=this,f=d[a];c.noConflict=function(){return d[a]=f,c},d[a]=c}})('travel',function(a={},b){a=JSON.parse(JSON.stringify(a));var c=function f(g,h,j){if('string'==typeof h&&(h=h.split('.')),h instanceof Array&&0!==h.length){var k=(h=h.slice()).shift();if('object'==typeof g&&null!==g)return'*'===k&&(k='.*'),'string'==typeof k&&(k=new RegExp(k)),0===h.length?Object.keys(g).filter(k.test.bind(k)).map(function(l){var m=g[l];return j&&j(m,g,l),m}):Array.prototype.concat.apply([],Object.keys(g).filter(k.test.bind(k)).map(function(l){return f(g[l],h,j)}))}};for(let f in b)c(a,f,function(g,h,j){h[j]=b[f](a,g)});var d=function(f,g){return'Array'===f.constructor.name&&[][g]?f[g]:f[g]?f[g]instanceof Function?new Proxy(f[g](),{get:d}):'object'==typeof f[g]?new Proxy(f[g],{get:d}):f[g]:'Not found'};return new Proxy(a,{get:d})});