mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2026-11-30 16:58:48 +08:00
1 line
1.1 KiB
JavaScript
1 line
1.1 KiB
JavaScript
import{g as e,m as t,n,t as r}from"./toString-BWDzaUQG.js";var i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function o(n,r){if(t(n))return!1;var o=typeof n;return o==`number`||o==`symbol`||o==`boolean`||n==null||e(n)?!0:a.test(n)||!i.test(n)||r!=null&&n in Object(r)}var s=`Expected a function`;function c(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(s);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(c.Cache||n),r}c.Cache=n;var l=500;function u(e){var t=c(e,function(e){return n.size===l&&n.clear(),e}),n=t.cache;return t}var d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f=/\\(\\)?/g,p=u(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(d,function(e,n,r,i){t.push(r?i.replace(f,`$1`):n||e)}),t});function m(e,n){return t(e)?e:o(e,n)?[e]:p(r(e))}var h=1/0;function g(t){if(typeof t==`string`||e(t))return t;var n=t+``;return n==`0`&&1/t==-h?`-0`:n}export{m as n,o as r,g as t}; |