MCPcopy Index your code
hub / github.com/SortableJS/Sortable / _toPrimitive

Function _toPrimitive

modular/sortable.esm.js:82–91  ·  view source on GitHub ↗
(t, r)

Source from the content-addressed store, hash-verified

80 return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
81}
82function _toPrimitive(t, r) {
83 if ("object" != typeof t || !t) return t;
84 var e = t[Symbol.toPrimitive];
85 if (void 0 !== e) {
86 var i = e.call(t, r || "default");
87 if ("object" != typeof i) return i;
88 throw new TypeError("@@toPrimitive must return a primitive value.");
89 }
90 return ("string" === r ? String : Number)(t);
91}
92function _toPropertyKey(t) {
93 var i = _toPrimitive(t, "string");
94 return "symbol" == typeof i ? i : i + "";

Callers 1

_toPropertyKeyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…