MCPcopy Index your code
hub / github.com/dataease/SQLBot / _toString_toString

Function _toString_toString

frontend/public/swagger-ui-bundle.js:39668–39723  ·  view source on GitHub ↗
(s, o)

Source from the content-addressed store, hash-verified

39666 const ma = _curry2(function reject(s, o) {
39667 return da(_complement(s), o)
39668 })
39669 function _toString_toString(s, o) {
39670 var i = function recur(i) {
39671 var a = o.concat([s])
39672 return _includes(i, a) ? '<Circular>' : _toString_toString(i, a)
39673 },
39674 mapPairs = function (s, o) {
39675 return _map(function (o) {
39676 return _quote(o) + ': ' + i(s[o])
39677 }, o.slice().sort())
39678 }
39679 switch (Object.prototype.toString.call(s)) {
39680 case '[object Arguments]':
39681 return '(function() { return arguments; }(' + _map(i, s).join(', ') + '))'
39682 case '[object Array]':
39683 return (
39684 '[' +
39685 _map(i, s)
39686 .concat(
39687 mapPairs(
39688 s,
39689 ma(function (s) {
39690 return /^\d+$/.test(s)
39691 }, ea(s))
39692 )
39693 )
39694 .join(', ') +
39695 ']'
39696 )
39697 case '[object Boolean]':
39698 return 'object' == typeof s ? 'new Boolean(' + i(s.valueOf()) + ')' : s.toString()
39699 case '[object Date]':
39700 return 'new Date(' + (isNaN(s.valueOf()) ? i(NaN) : _quote(aa(s))) + ')'
39701 case '[object Map]':
39702 return 'new Map(' + i(Array.from(s)) + ')'
39703 case '[object Null]':
39704 return 'null'
39705 case '[object Number]':
39706 return 'object' == typeof s
39707 ? 'new Number(' + i(s.valueOf()) + ')'
39708 : 1 / s == -1 / 0
39709 ? '-0'
39710 : s.toString(10)
39711 case '[object Set]':
39712 return 'new Set(' + i(Array.from(s).sort()) + ')'
39713 case '[object String]':
39714 return 'object' == typeof s ? 'new String(' + i(s.valueOf()) + ')' : _quote(s)
39715 case '[object Undefined]':
39716 return 'undefined'
39717 default:
39718 if ('function' == typeof s.toString) {
39719 var a = s.toString()
39720 if ('[object Object]' !== a) return a
39721 }
39722 return '{' + mapPairs(s, ea(s)).join(', ') + '}'
39723 }
39724 }
39725 const ga = _curry1(function toString(s) {

Callers 2

iFunction · 0.85

Calls 11

_mapFunction · 0.85
mapPairsFunction · 0.85
eaFunction · 0.85
_quoteFunction · 0.85
concatMethod · 0.80
valueOfMethod · 0.80
iFunction · 0.70
maFunction · 0.50
aaFunction · 0.50
toStringMethod · 0.45
fromMethod · 0.45

Tested by

no test coverage detected