mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2026-06-08 15:30:29 +08:00
2 lines
1.5 KiB
JavaScript
2 lines
1.5 KiB
JavaScript
const O=typeof window<"u",h=(t,e=!1)=>e?Symbol.for(t):Symbol(t),w=(t,e,o)=>y({l:t,k:e,s:o}),y=t=>JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),S=t=>typeof t=="number"&&isFinite(t),m=t=>a(t)==="[object Date]",A=t=>a(t)==="[object RegExp]",T=t=>b(t)&&Object.keys(t).length===0,_=Object.assign,d=Object.create,p=(t=null)=>d(t);let l;const E=()=>l||(l=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:p());function N(t){return t.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const j=Object.prototype.hasOwnProperty;function P(t,e){return j.call(t,e)}const u=Array.isArray,f=t=>typeof t=="function",x=t=>typeof t=="string",D=t=>typeof t=="boolean",i=t=>t!==null&&typeof t=="object",F=t=>i(t)&&f(t.then)&&f(t.catch),g=Object.prototype.toString,a=t=>g.call(t),b=t=>a(t)==="[object Object]",J=t=>t==null?"":u(t)||b(t)&&t.toString===g?JSON.stringify(t,null,2):String(t);function q(t,e=""){return t.reduce((o,n,r)=>r===0?o+n:o+e+n,"")}function B(t,e){}const c=t=>!i(t)||u(t);function C(t,e){if(c(t)||c(e))throw new Error("Invalid value");const o=[{src:t,des:e}];for(;o.length;){const{src:n,des:r}=o.pop();Object.keys(n).forEach(s=>{s!=="__proto__"&&(i(n[s])&&!i(r[s])&&(r[s]=Array.isArray(n[s])?[]:p()),c(r[s])||c(n[s])?r[s]=n[s]:o.push({src:n[s],des:r[s]}))})}}export{x as a,u as b,b as c,p as d,_ as e,D as f,A as g,i as h,f as i,P as j,E as k,S as l,T as m,m as n,N as o,q as p,F as q,w as r,h as s,J as t,O as u,C as v,B as w};
|