@minionorg/share
Version:
2 lines (1 loc) • 854 B
JavaScript
(function(n,r){typeof exports=="object"&&typeof module<"u"?r(exports):typeof define=="function"&&define.amd?define(["exports"],r):(n=typeof globalThis<"u"?globalThis:n||self,r(n.index={}))})(this,function(n){"use strict";function r(e){return e.charAt(0).toUpperCase()+e.slice(1)}function i(e){if(!e)throw new SyntaxError("type is must");return function(t){return Object.prototype.toString.call(t)===`[object ${r(e)}]`}}function o(e,t){if(!i("string")(e))throw new TypeError("The parameter type is string");return t!==void 0&&e.length===0?t:e.charAt(0)}function u(e){const t=o(e);return t>="0"&&t<="9"}function s(e,t){if(!u(e)){if(t!==void 0)return t;throw new RangeError("The character "+e+" is not in the range '0' - '9'")}return e.charCodeAt(0)-48}n.default=s,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});