strings.js
Advanced tools
Comparing version 1.4.1 to 1.4.2
{ | ||
"name": "strings.js", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "A Javascript string manipulation library", | ||
"main": "strings.min.js", | ||
"scripts": { | ||
"uglify": "uglifyjs strings.js -c -m -o strings.min.js", | ||
"build": "coffee -c --transpile strings.coffee && npm run uglify", | ||
"test": "jasmine" | ||
"test": "jasmine", | ||
"uglify": "terser strings.js -c -m -o strings.min.js" | ||
}, | ||
@@ -21,3 +22,3 @@ "repository": { | ||
], | ||
"author": "Dennis Raymondo <phazelift@gmail.com> (https://github.com/phazelift/)", | ||
"author": "dennis raymondo van der sluis", | ||
"license": "MIT", | ||
@@ -24,0 +25,0 @@ "bugs": { |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
@@ -23,5 +23,5 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } | ||
// Generated by CoffeeScript 2.5.1 | ||
// Generated by CoffeeScript 2.7.0 | ||
(function () { | ||
@@ -28,0 +28,0 @@ // strings.coffee - A Javascript string manipulation library, written in Coffeescript. |
@@ -1,1 +0,1 @@ | ||
"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(n){return function(){var e,t=_getPrototypeOf(n);if(_isNativeReflectConstruct()){var r=_getPrototypeOf(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return _possibleConstructorReturn(this,e)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}(function(){var u,g,a,p,i,f,e,o=[].indexOf;for(e in a=require("types.js"),f=function(e){var t,r,n,i,u;if(p.notArray(e))return 0;for(t=r=0,n=e.length;r<n;t=++r){if(u=e[t],(i=p.forceNumber(u)).void)return t;e[t]=i}return e.length},p=function(){function s(){_classCallCheck(this,s)}return _createClass(s,null,[{key:"inRange",value:function(e,t){return!(a.isNaN(e=parseInt(e,10))||f(t)<2)&&(e>=t[0]&&e<=t[1])}},{key:"limitNumber",value:function(e,t){return e=a.forceNumber(e,0),f(t)<2?e:e<t[0]?t[0]:e>t[1]?t[1]:e}},{key:"randomNumber",value:function(e,t){return f([e,t])<2?0:t<e?e:(t=t-e+1,Math.floor(Math.random()*t+e))}},{key:"shuffleArray",value:function(e){var t,r,n,i,u;if(a.notArray(e)||e.length<1)return[];for(t=r=i=e.length-1;i<=0?r<=0:0<=r;t=i<=0?++r:--r)n=s.randomNumber(0,t),u=e[t],e[t]=e[n],e[n]=u;return e}},{key:"positiveIndex",value:function(e,t){return 0!==(e=a.forceNumber(e,0))&&(t=Math.abs(a.forceNumber(t)),Math.abs(e)<=t&&(0<e?e-1:t+e))}},{key:"insertSort",value:function(e){var t,r,n,i,u;for(r=n=1,u=e.length-1;1<=u?n<=u:u<=n;r=1<=u?++n:--n){for(t=e[r],i=r-1;0<=i&&e[i]>t;)e[i+1]=e[i],--i;e[+i+1]=t}return e}},{key:"noDupAndReverse",value:function(e){var t,r,n,i;for(n=[],t=r=i=e.length-1;i<=0?r<=0:0<=r;t=i<=0?++r:--r)n[n.length-1]!==e[t]&&n.push(e[t]);return n}},{key:"sortNoDupAndReverse",value:function(e,t){var r,n,i,u,o;for(u=[],r=n=0,i=e.length;n<i;r=++n)o=e[r],(o=a.forceNumber(o)).void||(o<=t&&(o=s.positiveIndex(o,t)),u.push(a.forceNumber(o,0)));return s.noDupAndReverse(s.insertSort(u))}}]),s}(),a)p[e]=a[e];u=function(){var e=function(){_inherits(n,p);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.call(this)}return _createClass(n,null,[{key:"ascii",value:function(e){return String.fromCharCode(p.forceNumber(e))}},{key:"ordinal",value:function(e){return p.forceNumber(p.forceString(e).charCodeAt(),0)}},{key:"random",value:function(e){var t,r;return(!p.isArray(e)||e.length<2)&&(e=n.ASCII_RANGE_ALL),r=p.limitNumber(e[0],e),t=p.limitNumber(e[1],e),n.ascii(p.randomNumber(r,t))}}]),n}();return e.ASCII_RANGE_UPPERCASE=[65,90],e.ASCII_RANGE_LOWERCASE=[97,122],e.ASCII_RANGE_NUMBERS=[48,57],e.ASCII_RANGE_SPECIAL_1=[32,47],e.ASCII_RANGE_SPECIAL_2=[58,64],e.ASCII_RANGE_SPECIAL_3=[91,96],e.ASCII_RANGE_SPECIAL_4=[123,126],e.ASCII_RANGE_ALL=[32,126],e.REGEXP_SPECIAL_CHARS=["?","\\","[","]","(",")","*","+",".","/","|","^","$","<",">","-","&"],e}.call(this),i=function(e,t){var r,n,i,u,o,s,a=0<arguments.length&&void 0!==e?e:"",c=1<arguments.length?t:void 0;if(""===(a=p.forceString(a)))return a;for(var f=arguments.length,l=new Array(2<f?f-2:0),h=2;h<f;h++)l[h-2]=arguments[h];if(l.length<1||void 0===l[0])return a[c]();if(p.isNumber(l[0]))for(n=0,u=l.length;n<u;n++)r=l[n],s=p.positiveIndex(r,a.length),a=g.xs(a,function(e,t){return t===s?e[c]():e});else if(p.isString(l[0]))for(i=0,o=l.length;i<o;i++)r=l[i],a=g.replace(a,r,r[c](),"gi");return a},g=function(){var e=function(){_inherits(c,u);var t=_createSuper(c);function c(){var e;return _classCallCheck(this,c),(e=t.call(this)).set.apply(_assertThisInitialized(e),arguments),e.wrapMethod=null,e.crop=e.slice,e}return _createClass(c,null,[{key:"create",value:function(){var e,t,r,n;for(n="",t=0,r=arguments.length;t<r;t++)e=arguments[t],n+=p.forceString(e);return n}},{key:"get",value:function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i,u,o,s,a;if(arguments.length<2)return"";for(u=(e=p.forceString(e)).length,a="",o=i=1,s=arguments.length;1<=s?i<=s:s<=i;o=1<=s?++i:--i)!1!==(o=p.positiveIndex(arguments[o],u))&&(a+=e[o]);return a}},{key:"sort",value:function(e){return e=p.forceString(e).trim().split(""),p.insertSort(e).join("")}},{key:"random",value:function(e,t){var r,n,i;for(i="",r=1,n=e=p.forceNumber(e,1);1<=n?r<=n:n<=r;1<=n?++r:--r)i+=u.random(t);return i}},{key:"times",value:function(e,t){var r;if(""===(e=p.forceString(e)))return"";for(t=p.forceNumber(t,1),r="";0<t--;)r+=e;return r}},{key:"regEscape",value:function(e){return""===(e=p.forceString(e))?e:c.xs(e,function(e){return!(0<=o.call(u.REGEXP_SPECIAL_CHARS,e))||"\\"+e})}},{key:"empty",value:function(e){return!(p.notString(e)||0<e.length)}},{key:"isAlpha",value:function(e){return""!==(e=p.forceString(e))&&/^[a-z]*$/gi.test(e)}},{key:"isNumeric",value:function(e){return""!==(e=p.forceString(e))&&/^[0-9]*$/g.test(e)}},{key:"isAlphaNumeric",value:function(e){return""!==(e=p.forceString(e))&&/^[0-9|a-z]*$/gi.test(e)}},{key:"isSpecial",value:function(e){return""!==(e=p.forceString(e))&&/^[^0-9|a-z]*$/gi.test(e)}},{key:"isSpace",value:function(e){return/^[ \t]+$/g.test(e)}},{key:"hasUpper",value:function(e){return/[A-Z]+/g.test(e)}},{key:"isUpper",value:function(e){return/^[A-Z]+$/g.test(e)}},{key:"isLower",value:function(e){return/^[a-z]+$/g.test(e)}},{key:"xs",value:function(e,t){var r,n,i,u,o,s,a=0<arguments.length&&void 0!==e?e:"",c=1<arguments.length?t:void 0;if(-1==(i=(a=p.forceString(a)).length-1))return"";for(c=p.forceFunction(c,function(e){return e}),s="",r=n=0,u=i;0<=u?n<=u:u<=n;r=0<=u?++n:--n)(o=c(a[r],r))&&(!0===o?s+=a[r]:p.isStringOrNumber(o)&&(s+=o));return s}},{key:"copy",value:function(e,t,r){return t=p.forceNumber(t),""===(e=p.forceString(e))||Math.abs(t)>e.length?"":(0<t&&--t,e.substr(t,p.forceNumber(r,e.length)))}},{key:"replace",value:function(e,t,r,n){var i,u=0<arguments.length&&void 0!==e?e:"",o=1<arguments.length&&void 0!==t?t:"",s=2<arguments.length&&void 0!==r?r:"",a=3<arguments.length&&void 0!==n?n:"g";return!p.isStringOrNumber(u)||"string"!==(i=p.typeof(o))&&"number"!==i&&"regexp"!==i?p.forceString(u):(p.notRegExp(o)&&(o=c.regEscape(o+""),o=new RegExp(o,a)),(u+"").replace(o,s))}},{key:"trim",value:function(e){return c.replace(e,/^\s+|\s+$/g)}},{key:"trimLeft",value:function(e){return c.replace(e,/^\s+/g)}},{key:"trimRight",value:function(e){return c.replace(e,/\s+$/g)}},{key:"oneSpace",value:function(e){return c.replace(e,/\s+/g," ")}},{key:"oneSpaceAndTrim",value:function(e){return c.oneSpace(c.trim(e))}},{key:"toCamel",value:function(e,t){var r;return e=p.forceString(e),t=p.forceString(t,"-"),r=new RegExp(c.regEscape(t)+"([a-z])","ig"),c.replace(e,r,function(e,t){return t.toUpperCase()})}},{key:"unCamel",value:function(e,t){return e=p.forceString(e),t=p.forceString(t,"-"),c.replace(e,/([A-Z])/g,t+"$1").toLowerCase()}},{key:"shuffle",value:function(e){return e=p.forceString(e),p.shuffleArray((e+"").split("")).join("")}},{key:"find",value:function(e,t,r){var n,i;if(n=[],""===(e=p.forceString(e)))return n;if(r=p.forceString(r,"g"),p.isStringOrNumber(t))t=new RegExp(c.regEscape(t+""),r);else{if(!p.isRegExp(t))return n;t=new RegExp(t.source,r)}if(t.global)for(;i=t.exec(e);)n.push(i.index+1);else(i=t.exec(e))&&n.push(i.index+1);return n}},{key:"count",value:function(e,t){return c.find(e,t).length}},{key:"contains",value:function(e,t){return 0<c.count(e,t)}},{key:"between",value:function(e,t,r){var n;return p.allStringOrNumber(e,t,r)?(t=c.regEscape(t+""),r=c.regEscape(r+""),(null!=(n=new RegExp(t+"(.+)"+r).exec(e+""))?n[1]:void 0)||""):""}},{key:"slice",value:function(e,t,r){return e=p.forceString(e),t=p.forceNumber(t||1),!1!==(t=p.positiveIndex(t,e.length))?(r=p.forceNumber(r),e.slice(t,t+r)):""}},{key:"truncate",value:function(e,t,r){return e=p.forceString(e),t=p.forceNumber(t,e.length),(e=c.slice(e,1,t))+p.forceString(r)}},{key:"pop",value:function(e,t){return e=p.forceString(e),t=p.forceNumber(t,1),e.slice(0,-Math.abs(t))}},{key:"split",value:function(e,t){var r,n,i,u,o;if(u=[],(e=c.oneSpaceAndTrim(e)).length<1)return u;for(t=p.forceString(t," "),n=0,i=(r=e.split(t[0]||"")).length;n<i;n++)(o=r[n]).match(/^\s$/)||u.push(c.trim(o));return u}},{key:"reverse",value:function(e){var t,r,n,i,u,o=0<arguments.length&&void 0!==e?e:"";if((n=(o=p.forceString(o)).length-1)<1)return o;for(u="",t=r=i=n;i<=0?r<=0:0<=r;t=i<=0?++r:--r)u+=o[t];return u}},{key:"upper",value:function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return i.apply(void 0,[e,"toUpperCase"].concat(r))}},{key:"lower",value:function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return i.apply(void 0,[e,"toLowerCase"].concat(r))}},{key:"insert",value:function(e,t){for(var r=arguments.length,n=new Array(2<r?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];var u,o,s,a;if(""===(e=p.forceString(e))||""===(t=p.forceString(t)))return e;if(n=p.sortNoDupAndReverse(n,e.length),(s=f(n)-1)<0)return e;for(u=o=0,a=s;0<=a?o<=a:a<=o;u=0<=a?++o:--o)(u=n[u])>e.length?e+=t:e=e.substr(0,u)+t+e.substr(u);return e}},{key:"removeRange",value:function(e,r,t){var n;return""===(e=p.forceString(e))||!1===(r=p.positiveIndex(r,e.length))||(t=p.forceNumber(t,1))<0?e:(n=r+t,c.xs(e,function(e,t){if(t<r||n<=t)return!0}))}},{key:"removePos",value:function(t){var r;if(""===(t=p.forceString(t)))return"";for(var e=arguments.length,n=new Array(1<e?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return r=n.map(function(e){return p.positiveIndex(e,t.length)}),c.xs(t,function(e,t){if(!(0<=o.call(r,t)))return!0})}},{key:"remove",value:function(){for(var e,t,r,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length,u=new Array(1<i?i-1:0),o=1;o<i;o++)u[o-1]=arguments[o];if(""===(n=p.forceString(n))||u.length<1)return n;for(e=0,t=u.length;e<t;e++)r=u[e],n=c.replace(n,r);return n}},{key:"startsWith",value:function(e,t){return""!==(e=p.forceString(e))&&""!==(t=p.forceString(t))&&(t=new RegExp("^"+c.regEscape(t))).test(e)}},{key:"endsWith",value:function(e,t){return""!==(e=p.forceString(e))&&""!==(t=p.forceString(t))&&(t=new RegExp(c.regEscape(t)+"$")).test(e)}},{key:"charactersMatch",value:function(e,t){var r,n,i,u;if(!p.allString(e,t)||e.length!==t.length)return!1;for(t=t.split(""),n=0,i=e.length;n<i;n++){if(r=e[n],!t.length)return!1;if(!(-1<(u=t.indexOf(r))))return!1;t.splice(u,1)}return!0}},{key:"wrap",value:function(e,t){var r,n=0<arguments.length&&void 0!==e?e:"",i=1<arguments.length&&void 0!==t?t:"";return(r=function(e){return c.create(n,e,i)}).wrap=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return n=p.forceString(e)+n,i+=p.forceString(t)},r}}]),_createClass(c,[{key:"set",value:function(){return this.string=c.create.apply(this,arguments),this}},{key:"sort",value:function(){return this.string=c.sort(this.string),this}},{key:"random",value:function(e,t){return this.string=c.random(e,t),this}},{key:"xs",value:function(e){return this.string=c.xs(this.string,e),this}},{key:"times",value:function(e){var t=0<arguments.length&&void 0!==e?e:1;return this.string=c.times(this.string,t),this}},{key:"get",value:function(){var e,t,r,n;if(0<arguments.length){for(n="",e=0,t=arguments.length;e<t;e++)r=arguments[e],!1!==(r=p.positiveIndex(r,this.length))&&(n+=this.string[r]);return n}return this.string}},{key:"copy",value:function(e,t){return c.copy(this.string,e,t)}},{key:"empty",value:function(){return c.empty(this.string)}},{key:"isAlpha",value:function(){return c.isAlpha(this.string)}},{key:"isNumeric",value:function(){return c.isNumeric(this.string)}},{key:"isAlphaNumeric",value:function(){return c.isAlphaNumeric(this.string)}},{key:"isSpecial",value:function(){return c.isSpecial(this.string)}},{key:"isUpper",value:function(){return c.isUpper(this.string)}},{key:"hasUpper",value:function(){return c.hasUpper(this.string)}},{key:"isLower",value:function(){return c.isLower(this.string)}},{key:"isSpace",value:function(){return c.isSpace(this.string)}},{key:"push",value:function(){return this.string=this.string+c.create.apply(this,arguments),this}},{key:"prepend",value:function(){return this.string=c.create.apply(this,arguments)+this.string,this}},{key:"pop",value:function(e){return this.string=c.pop(this.string,e),this}},{key:"insert",value:function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return this.string=c.insert.apply(c,[this.string,e].concat(r)),this}},{key:"trim",value:function(){return this.string=c.trim(this.string),this}},{key:"trimLeft",value:function(){return this.string=c.trimLeft(this.string),this}},{key:"trimRight",value:function(){return this.string=c.trimRight(this.string),this}},{key:"oneSpace",value:function(){return this.string=c.oneSpace(this.string),this}},{key:"oneSpaceAndTrim",value:function(){return this.string=c.oneSpaceAndTrim(this.string),this}},{key:"find",value:function(e){return c.find(this.string,e)}},{key:"count",value:function(e){return c.count(this.string,e)}},{key:"contains",value:function(e){return c.contains(this.string,e)}},{key:"between",value:function(e,t){return c.between(this.string,e,t)}},{key:"slice",value:function(e,t){return this.string=c.slice(this.string,e,t),this}},{key:"truncate",value:function(e,t){return this.string=c.truncate(this.string,e,t),this}},{key:"remove",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.string=c.remove.apply(c,[this.string].concat(t)),this}},{key:"removeRange",value:function(e,t){return this.string=c.removeRange(this.string,e,t),this}},{key:"removePos",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.string=c.removePos.apply(c,[this.string].concat(t)),this}},{key:"replace",value:function(e,t,r){return this.string=c.replace(this.string,e,t,r),this}},{key:"reverse",value:function(){return this.string=c.reverse(this.string),this}},{key:"upper",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.string=c.upper.apply(c,[this.string].concat(t)),this}},{key:"lower",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.string=c.lower.apply(c,[this.string].concat(t)),this}},{key:"shuffle",value:function(){return this.string=c.shuffle(this.string),this}},{key:"toCamel",value:function(e){return this.string=c.toCamel(this.string,e),this}},{key:"unCamel",value:function(e){return this.string=c.unCamel(this.string,e),this}},{key:"startsWith",value:function(e){return c.startsWith(this.string,e)}},{key:"endsWith",value:function(e){return c.endsWith(this.string,e)}},{key:"charactersMatch",value:function(e){return c.charactersMatch(this.string,e)}},{key:"setWrap",value:function(e,t){return p.isNull(this.wrapMethod)?this.wrapMethod=c.wrap(e,t):this.wrapMethod.wrap(e,t),this}},{key:"removeWrap",value:function(){return this.wrapMethod=null,this}},{key:"applyWrap",value:function(e,t){return this.string=this.setWrap(e,t).wrap,this.removeWrap(),this}}]),c}();return e.Types=a,e.Chars=u,e}.call(this),Object.defineProperty(g.prototype,"$",{get:function(){return this.get()}}),Object.defineProperty(g.prototype,"length",{get:function(){return this.string.length}}),Object.defineProperty(g.prototype,"wrap",{get:function(){return p.isNull(this.wrapMethod)?this.string:this.wrapMethod(this.string)}}),g.crop=g.slice,g.prototype.crop=g.prototype.slice,g.prototype.append=g.prototype.push,"undefined"!=typeof define&&null!==define&&"function"==typeof define&&define.amd?define("strings",[],function(){return g}):"undefined"!=typeof module&&null!==module?module.exports=g:"undefined"!=typeof window&&null!==window&&(window.Types=a,window.Strings=g)}).call(void 0); | ||
"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(function(){var e,t,r,n,i,u,o,s=[].indexOf;for(o in r=require("types.js"),u=function(e){var t,r,i,u,o;if(n.notArray(e))return 0;for(t=r=0,i=e.length;r<i;t=++r){if(o=e[t],(u=n.forceNumber(o)).void)return t;e[t]=u}return e.length},n=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"inRange",value:function(e,t){return!(r.isNaN(e=parseInt(e,10))||u(t)<2)&&(e>=t[0]&&e<=t[1])}},{key:"limitNumber",value:function(e,t){return e=r.forceNumber(e,0),u(t)<2?e:e<t[0]?t[0]:e>t[1]?t[1]:e}},{key:"randomNumber",value:function(e,t){return u([e,t])<2?0:t<e?e:(t=t-e+1,Math.floor(Math.random()*t+e))}},{key:"shuffleArray",value:function(t){var n,i,u,o,s;if(r.notArray(t)||t.length<1)return[];for(n=i=o=t.length-1;o<=0?i<=0:i>=0;n=o<=0?++i:--i)u=e.randomNumber(0,n),s=t[n],t[n]=t[u],t[u]=s;return t}},{key:"positiveIndex",value:function(e,t){return 0!==(e=r.forceNumber(e,0))&&(t=Math.abs(r.forceNumber(t)),Math.abs(e)<=t&&(e>0?e-1:t+e))}},{key:"insertSort",value:function(e){var t,r,n,i,u;for(r=n=1,u=e.length-1;1<=u?n<=u:n>=u;r=1<=u?++n:--n){for(t=e[r],i=r-1;i>=0&&e[i]>t;)e[i+1]=e[i],--i;e[+i+1]=t}return e}},{key:"noDupAndReverse",value:function(e){var t,r,n,i;for(n=[],t=r=i=e.length-1;i<=0?r<=0:r>=0;t=i<=0?++r:--r)n[n.length-1]!==e[t]&&n.push(e[t]);return n}},{key:"sortNoDupAndReverse",value:function(t,n){var i,u,o,s,a;for(s=[],i=u=0,o=t.length;u<o;i=++u)a=t[i],(a=r.forceNumber(a)).void||(a<=n&&(a=e.positiveIndex(a,n)),s.push(r.forceNumber(a,0)));return e.noDupAndReverse(e.insertSort(s))}}]),e}(),r)n[o]=r[o];e=function(){var e=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.call(this)}return _createClass(r,null,[{key:"ascii",value:function(e){return String.fromCharCode(n.forceNumber(e))}},{key:"ordinal",value:function(e){return n.forceNumber(n.forceString(e).charCodeAt(),0)}},{key:"random",value:function(e){var t,i;return(!n.isArray(e)||e.length<2)&&(e=r.ASCII_RANGE_ALL),i=n.limitNumber(e[0],e),t=n.limitNumber(e[1],e),r.ascii(n.randomNumber(i,t))}}]),r}(n);return e.ASCII_RANGE_UPPERCASE=[65,90],e.ASCII_RANGE_LOWERCASE=[97,122],e.ASCII_RANGE_NUMBERS=[48,57],e.ASCII_RANGE_SPECIAL_1=[32,47],e.ASCII_RANGE_SPECIAL_2=[58,64],e.ASCII_RANGE_SPECIAL_3=[91,96],e.ASCII_RANGE_SPECIAL_4=[123,126],e.ASCII_RANGE_ALL=[32,126],e.REGEXP_SPECIAL_CHARS=["?","\\","[","]","(",")","*","+",".","/","|","^","$","<",">","-","&"],e}.call(this),i=function(){var e,r,i,u,o,s,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",c=arguments.length>1?arguments[1]:void 0;if(""===(a=n.forceString(a)))return a;for(var f=arguments.length,l=new Array(f>2?f-2:0),h=2;h<f;h++)l[h-2]=arguments[h];if(l.length<1||void 0===l[0])return a[c]();if(n.isNumber(l[0]))for(r=0,u=l.length;r<u;r++)e=l[r],s=n.positiveIndex(e,a.length),a=t.xs(a,(function(e,t){return t===s?e[c]():e}));else if(n.isString(l[0]))for(i=0,o=l.length;i<o;i++)e=l[i],a=t.replace(a,e,e[c](),"gi");return a},t=function(){var t=function(t){_inherits(o,t);var r=_createSuper(o);function o(){var e;return _classCallCheck(this,o),(e=r.call(this)).set.apply(_assertThisInitialized(e),arguments),e.wrapMethod=null,e.crop=e.slice,e}return _createClass(o,null,[{key:"create",value:function(){var e,t,r,i;for(i="",t=0,r=arguments.length;t<r;t++)e=arguments[t],i+=n.forceString(e);return i}},{key:"get",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];var u,o,s,a,c;if(arguments.length<2)return"";for(o=(e=n.forceString(e)).length,c="",s=u=1,a=arguments.length;1<=a?u<=a:u>=a;s=1<=a?++u:--u)!1!==(s=n.positiveIndex(arguments[s],o))&&(c+=e[s]);return c}},{key:"sort",value:function(e){return e=n.forceString(e).trim().split(""),n.insertSort(e).join("")}},{key:"random",value:function(t,r){var i,u,o;for(o="",i=1,u=t=n.forceNumber(t,1);1<=u?i<=u:i>=u;1<=u?++i:--i)o+=e.random(r);return o}},{key:"times",value:function(e,t){var r;if(""===(e=n.forceString(e)))return"";for(t=n.forceNumber(t,1),r="";t-- >0;)r+=e;return r}},{key:"regEscape",value:function(t){return""===(t=n.forceString(t))?t:o.xs(t,(function(t){return!(s.call(e.REGEXP_SPECIAL_CHARS,t)>=0)||"\\"+t}))}},{key:"empty",value:function(e){return!(n.notString(e)||e.length>0)}},{key:"isAlpha",value:function(e){return""!==(e=n.forceString(e))&&/^[a-z]*$/gi.test(e)}},{key:"isNumeric",value:function(e){return""!==(e=n.forceString(e))&&/^[0-9]*$/g.test(e)}},{key:"isAlphaNumeric",value:function(e){return""!==(e=n.forceString(e))&&/^[0-9|a-z]*$/gi.test(e)}},{key:"isSpecial",value:function(e){return""!==(e=n.forceString(e))&&/^[^0-9|a-z]*$/gi.test(e)}},{key:"isSpace",value:function(e){return/^[ \t]+$/g.test(e)}},{key:"hasUpper",value:function(e){return/[A-Z]+/g.test(e)}},{key:"isUpper",value:function(e){return/^[A-Z]+$/g.test(e)}},{key:"isLower",value:function(e){return/^[a-z]+$/g.test(e)}},{key:"xs",value:function(){var e,t,r,i,u,o,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",a=arguments.length>1?arguments[1]:void 0;if(-1==(r=(s=n.forceString(s)).length-1))return"";for(a=n.forceFunction(a,(function(e){return e})),o="",e=t=0,i=r;0<=i?t<=i:t>=i;e=0<=i?++t:--t)(u=a(s[e],e))&&(!0===u?o+=s[e]:n.isStringOrNumber(u)&&(o+=u));return o}},{key:"copy",value:function(e,t,r){return t=n.forceNumber(t),""===(e=n.forceString(e))||Math.abs(t)>e.length?"":(t>0&&(t-=1),e.substr(t,n.forceNumber(r,e.length)))}},{key:"replace",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"g";return!n.isStringOrNumber(t)||"string"!==(e=n.typeof(r))&&"number"!==e&&"regexp"!==e?n.forceString(t):(n.notRegExp(r)&&(r=o.regEscape(r+""),r=new RegExp(r,u)),(t+"").replace(r,i))}},{key:"trim",value:function(e){return o.replace(e,/^\s+|\s+$/g)}},{key:"trimLeft",value:function(e){return o.replace(e,/^\s+/g)}},{key:"trimRight",value:function(e){return o.replace(e,/\s+$/g)}},{key:"oneSpace",value:function(e){return o.replace(e,/\s+/g," ")}},{key:"oneSpaceAndTrim",value:function(e){return o.oneSpace(o.trim(e))}},{key:"toCamel",value:function(e,t){var r;return e=n.forceString(e),t=n.forceString(t,"-"),r=new RegExp(o.regEscape(t)+"([a-z])","ig"),o.replace(e,r,(function(e,t){return t.toUpperCase()}))}},{key:"unCamel",value:function(e,t){return e=n.forceString(e),t=n.forceString(t,"-"),o.replace(e,/([A-Z])/g,t+"$1").toLowerCase()}},{key:"shuffle",value:function(e){return e=n.forceString(e),n.shuffleArray((e+"").split("")).join("")}},{key:"find",value:function(e,t,r){var i,u;if(i=[],""===(e=n.forceString(e)))return i;if(r=n.forceString(r,"g"),n.isStringOrNumber(t))t=new RegExp(o.regEscape(t+""),r);else{if(!n.isRegExp(t))return i;t=new RegExp(t.source,r)}if(t.global)for(;u=t.exec(e);)i.push(u.index+1);else(u=t.exec(e))&&i.push(u.index+1);return i}},{key:"count",value:function(e,t){return o.find(e,t).length}},{key:"contains",value:function(e,t){return o.count(e,t)>0}},{key:"between",value:function(e,t,r){var i;return n.allStringOrNumber(e,t,r)?(t=o.regEscape(t+""),r=o.regEscape(r+""),(null!=(i=new RegExp(t+"(.+)"+r).exec(e+""))?i[1]:void 0)||""):""}},{key:"slice",value:function(e,t,r){return e=n.forceString(e),t=n.forceNumber(t||1),!1!==(t=n.positiveIndex(t,e.length))?(r=n.forceNumber(r),e.slice(t,t+r)):""}},{key:"truncate",value:function(e,t,r){return e=n.forceString(e),t=n.forceNumber(t,e.length),(e=o.slice(e,1,t))+n.forceString(r)}},{key:"pop",value:function(e,t){return e=n.forceString(e),t=n.forceNumber(t,1),e.slice(0,-Math.abs(t))}},{key:"split",value:function(e,t){var r,i,u,s,a;if(s=[],(e=o.oneSpaceAndTrim(e)).length<1)return s;for(t=n.forceString(t," "),i=0,u=(r=e.split(t[0]||"")).length;i<u;i++)(a=r[i]).match(/^\s$/)||s.push(o.trim(a));return s}},{key:"reverse",value:function(){var e,t,r,i,u,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if((r=(o=n.forceString(o)).length-1)<1)return o;for(u="",e=t=i=r;i<=0?t<=0:t>=0;e=i<=0?++t:--t)u+=o[e];return u}},{key:"upper",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return i.apply(void 0,[e,"toUpperCase"].concat(r))}},{key:"lower",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return i.apply(void 0,[e,"toLowerCase"].concat(r))}},{key:"insert",value:function(e,t){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];var s,a,c,f;if(""===(e=n.forceString(e))||""===(t=n.forceString(t)))return e;if(i=n.sortNoDupAndReverse(i,e.length),0>(c=u(i)-1))return e;for(s=a=0,f=c;0<=f?a<=f:a>=f;s=0<=f?++a:--a)(s=i[s])>e.length?e+=t:e=e.substr(0,s)+t+e.substr(s);return e}},{key:"removeRange",value:function(e,t,r){var i;return""===(e=n.forceString(e))||!1===(t=n.positiveIndex(t,e.length))||0>(r=n.forceNumber(r,1))?e:(i=t+r,o.xs(e,(function(e,r){if(r<t||r>=i)return!0})))}},{key:"removePos",value:function(e){var t;if(""===(e=n.forceString(e)))return"";for(var r=arguments.length,i=new Array(r>1?r-1:0),u=1;u<r;u++)i[u-1]=arguments[u];return t=i.map((function(t){return n.positiveIndex(t,e.length)})),o.xs(e,(function(e,r){if(!(s.call(t,r)>=0))return!0}))}},{key:"remove",value:function(){for(var e,t,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",u=arguments.length,s=new Array(u>1?u-1:0),a=1;a<u;a++)s[a-1]=arguments[a];if(""===(i=n.forceString(i))||s.length<1)return i;for(e=0,t=s.length;e<t;e++)r=s[e],i=o.replace(i,r);return i}},{key:"startsWith",value:function(e,t){return""!==(e=n.forceString(e))&&""!==(t=n.forceString(t))&&(t=new RegExp("^"+o.regEscape(t))).test(e)}},{key:"endsWith",value:function(e,t){return""!==(e=n.forceString(e))&&""!==(t=n.forceString(t))&&(t=new RegExp(o.regEscape(t)+"$")).test(e)}},{key:"charactersMatch",value:function(e,t){var r,i,u,o;if(!n.allString(e,t)||e.length!==t.length)return!1;for(t=t.split(""),i=0,u=e.length;i<u;i++){if(r=e[i],!t.length)return!1;if(!((o=t.indexOf(r))>-1))return!1;t.splice(o,1)}return!0}},{key:"wrap",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(e=function(e){return o.create(t,e,r)}).wrap=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t=n.forceString(e)+t,r+=n.forceString(i)},e}}]),_createClass(o,[{key:"set",value:function(){return this.string=o.create.apply(this,arguments),this}},{key:"sort",value:function(){return this.string=o.sort(this.string),this}},{key:"random",value:function(e,t){return this.string=o.random(e,t),this}},{key:"xs",value:function(e){return this.string=o.xs(this.string,e),this}},{key:"times",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.string=o.times(this.string,e),this}},{key:"get",value:function(){var e,t,r,i;if(arguments.length>0){for(i="",e=0,t=arguments.length;e<t;e++)r=arguments[e],!1!==(r=n.positiveIndex(r,this.length))&&(i+=this.string[r]);return i}return this.string}},{key:"copy",value:function(e,t){return o.copy(this.string,e,t)}},{key:"empty",value:function(){return o.empty(this.string)}},{key:"isAlpha",value:function(){return o.isAlpha(this.string)}},{key:"isNumeric",value:function(){return o.isNumeric(this.string)}},{key:"isAlphaNumeric",value:function(){return o.isAlphaNumeric(this.string)}},{key:"isSpecial",value:function(){return o.isSpecial(this.string)}},{key:"isUpper",value:function(){return o.isUpper(this.string)}},{key:"hasUpper",value:function(){return o.hasUpper(this.string)}},{key:"isLower",value:function(){return o.isLower(this.string)}},{key:"isSpace",value:function(){return o.isSpace(this.string)}},{key:"push",value:function(){return this.string=this.string+o.create.apply(this,arguments),this}},{key:"prepend",value:function(){return this.string=o.create.apply(this,arguments)+this.string,this}},{key:"pop",value:function(e){return this.string=o.pop(this.string,e),this}},{key:"insert",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return this.string=o.insert.apply(o,[this.string,e].concat(r)),this}},{key:"trim",value:function(){return this.string=o.trim(this.string),this}},{key:"trimLeft",value:function(){return this.string=o.trimLeft(this.string),this}},{key:"trimRight",value:function(){return this.string=o.trimRight(this.string),this}},{key:"oneSpace",value:function(){return this.string=o.oneSpace(this.string),this}},{key:"oneSpaceAndTrim",value:function(){return this.string=o.oneSpaceAndTrim(this.string),this}},{key:"find",value:function(e){return o.find(this.string,e)}},{key:"count",value:function(e){return o.count(this.string,e)}},{key:"contains",value:function(e){return o.contains(this.string,e)}},{key:"between",value:function(e,t){return o.between(this.string,e,t)}},{key:"slice",value:function(e,t){return this.string=o.slice(this.string,e,t),this}},{key:"truncate",value:function(e,t){return this.string=o.truncate(this.string,e,t),this}},{key:"remove",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.string=o.remove.apply(o,[this.string].concat(t)),this}},{key:"removeRange",value:function(e,t){return this.string=o.removeRange(this.string,e,t),this}},{key:"removePos",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.string=o.removePos.apply(o,[this.string].concat(t)),this}},{key:"replace",value:function(e,t,r){return this.string=o.replace(this.string,e,t,r),this}},{key:"reverse",value:function(){return this.string=o.reverse(this.string),this}},{key:"upper",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.string=o.upper.apply(o,[this.string].concat(t)),this}},{key:"lower",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.string=o.lower.apply(o,[this.string].concat(t)),this}},{key:"shuffle",value:function(){return this.string=o.shuffle(this.string),this}},{key:"toCamel",value:function(e){return this.string=o.toCamel(this.string,e),this}},{key:"unCamel",value:function(e){return this.string=o.unCamel(this.string,e),this}},{key:"startsWith",value:function(e){return o.startsWith(this.string,e)}},{key:"endsWith",value:function(e){return o.endsWith(this.string,e)}},{key:"charactersMatch",value:function(e){return o.charactersMatch(this.string,e)}},{key:"setWrap",value:function(e,t){return n.isNull(this.wrapMethod)?this.wrapMethod=o.wrap(e,t):this.wrapMethod.wrap(e,t),this}},{key:"removeWrap",value:function(){return this.wrapMethod=null,this}},{key:"applyWrap",value:function(e,t){return this.string=this.setWrap(e,t).wrap,this.removeWrap(),this}}]),o}(e);return t.Types=r,t.Chars=e,t}.call(this),Object.defineProperty(t.prototype,"$",{get:function(){return this.get()}}),Object.defineProperty(t.prototype,"length",{get:function(){return this.string.length}}),Object.defineProperty(t.prototype,"wrap",{get:function(){return n.isNull(this.wrapMethod)?this.string:this.wrapMethod(this.string)}}),t.crop=t.slice,t.prototype.crop=t.prototype.slice,t.prototype.append=t.prototype.push,"undefined"!=typeof define&&null!==define&&"function"==typeof define&&define.amd?define("strings",[],(function(){return t})):"undefined"!=typeof module&&null!==module?module.exports=t:"undefined"!=typeof window&&null!==window&&(window.Types=r,window.Strings=t)}).call(void 0); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
190985
11
2674