@minionorg/share
Version:
2 lines (1 loc) • 745 B
JavaScript
(function(t,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(t=typeof globalThis<"u"?globalThis:t||self,n(t.index={}))})(this,function(t){"use strict";function n(e){return e.charAt(0).toUpperCase()+e.slice(1)}function u(e){if(!e)throw new SyntaxError("type is must");return function(o){return Object.prototype.toString.call(o)===`[object ${n(e)}]`}}function s(e,o,r){if(!u("Array")(e))throw new TypeError("The list must be array");const i=[...e];if(r===void 0)i.push(o);else if(u("Number")(r))i.splice(r,0,o);else throw new TypeError("The index must be number");return i}t.default=s,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});