Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

string-extended

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string-extended - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

.idea/extended.iml

119

index.js

@@ -27,4 +27,3 @@ (function () {

if (is.isDate(obj)) {
return isFinite(obj.valueOf())
? obj.getUTCFullYear() + '-' +
return isFinite(obj.valueOf()) ? obj.getUTCFullYear() + '-' +
f(obj.getUTCMonth() + 1) + '-' +

@@ -77,48 +76,48 @@ f(obj.getUTCDate()) + 'T' +

switch (typeof value) {
case 'string':
return quote(value);
case 'number':
return isFinite(value) ? String(value) : 'null';
case 'boolean':
case 'null':
return String(value);
case 'object':
if (!value) {
return 'null';
case 'string':
return quote(value);
case 'number':
return isFinite(value) ? String(value) : 'null';
case 'boolean':
case 'null':
return String(value);
case 'object':
if (!value) {
return 'null';
}
gap += indent;
partial = [];
if (Object.prototype.toString.apply(value) === '[object Array]') {
length = value.length;
for (i = 0; i < length; i += 1) {
partial[i] = str(i, value) || 'null';
}
gap += indent;
partial = [];
if (Object.prototype.toString.apply(value) === '[object Array]') {
length = value.length;
for (i = 0; i < length; i += 1) {
partial[i] = str(i, value) || 'null';
v = partial.length === 0 ? '[]' : gap ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : '[' + partial.join(',') + ']';
gap = mind;
return v;
}
if (rep && typeof rep === 'object') {
length = rep.length;
for (i = 0; i < length; i += 1) {
if (typeof rep[i] === 'string') {
k = rep[i];
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
v = partial.length === 0 ? '[]' : gap ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : '[' + partial.join(',') + ']';
gap = mind;
return v;
}
if (rep && typeof rep === 'object') {
length = rep.length;
for (i = 0; i < length; i += 1) {
if (typeof rep[i] === 'string') {
k = rep[i];
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
} else {
for (k in value) {
if (Object.prototype.hasOwnProperty.call(value, k)) {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
} else {
for (k in value) {
if (Object.prototype.hasOwnProperty.call(value, k)) {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
}
}
v = partial.length === 0 ? '{}' : gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : '{' + partial.join(',') + '}';
gap = mind;
return v;
}
v = partial.length === 0 ? '{}' : gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : '{' + partial.join(',') + '}';
gap = mind;
return v;
}

@@ -147,3 +146,3 @@ }

}());
}else{
} else {
stringify = JSON.stringify;

@@ -499,17 +498,17 @@ }

switch (type) {
case "s":
ret = formatString(replacer, format);
break;
case "d":
ret = formatNumber(replacer, format);
break;
case "j":
ret = formatObject(replacer, format);
break;
case "D":
ret = date.format(replacer, format);
break;
case "Z":
ret = date.format(replacer, format, true);
break;
case "s":
ret = formatString(replacer, format);
break;
case "d":
ret = formatNumber(replacer, format);
break;
case "j":
ret = formatObject(replacer, format);
break;
case "D":
ret = date.format(replacer, format);
break;
case "Z":
ret = date.format(replacer, format, true);
break;
}

@@ -616,4 +615,4 @@ }

} else if ("function" === typeof define) {
define(["require"], function (require) {
return defineString(require("extended"), require("is-extended"), require("date-extended"));
define(["extended", "is-extended", "date-extended"], function (extended, is, date) {
return defineString(extended, is, date);
});

@@ -620,0 +619,0 @@ } else {

{
"name": "string-extended",
"version": "0.0.3",
"version": "0.0.4",
"description": "Additional string extensions with a chainable api",

@@ -20,9 +20,9 @@ "main": "index.js",

"files": "test/browserling.js",
"browsers": {
"ie": [6, 7, 8, 9],
"chrome": [4, 23, "canary"],
"firefox": [3, 3.5, 3.6, 4, 17, "nightly"],
"opera": [10, 10.5, 11, 11.5, 11.6, 12, "next"],
"safari": ["5.0.1", 5.1]
}
"browsers": [
"ie/8..latest",
"chrome/20..latest",
"firefox/14..latest",
"safari/latest",
"iphone/6", "ipad/6"
]
},

@@ -34,8 +34,11 @@ "author": "Doug Martin",

"is-extended": "~0.0.3",
"date-extended": "~0.0.3"
"date-extended": "~0.0.3",
"grunt": "~0.4.1"
},
"devDependencies": {
"it": "~0.2.0",
"grunt-it": "~0.2.0"
"grunt-it": "~0.3.0",
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-jshint": "~0.4.3"
}
}
[![Build Status](https://travis-ci.org/doug-martin/string-extended.png?branch=master)](undefined)
[![browser support](http://ci.testling.com/doug-martin/string-extended.png)](http://ci.testling.com/doug-martin/string-extended)
[![browser support](https://ci.testling.com/doug-martin/string-extended.png)](https://ci.testling.com/doug-martin/string-extended)

@@ -5,0 +5,0 @@ # string-extended

@@ -1,3 +0,3 @@

/*! string-extended - v0.0.3 - 2013-01-22
/*! string-extended - v0.0.4 - 2013-04-16
* Copyright (c) 2013 Doug Martin; Licensed MIT */
(function(){"use strict";function e(e,t,n){function l(e,t){var n=e;if(a.test(t)){var r=t.match(a),i=r[1],s=r[3],o=r[4];o&&(o=parseInt(o,10),n.length<o?n=v(n,o,s,i):n=m(n,o))}return n}function c(e,n){var r;if(!t.isNumber(e))throw new Error("stringExtended.format : when using %d the parameter must be a number!");r=""+e;if(a.test(n)){var i=n.match(a),s=i[1],o=i[2],u=i[3],f=i[4];o&&(r=(e>0?"+":"")+r),f&&(f=parseInt(f,10),r.length<f?r=v(r,f,u||"0",s):r=m(r,f))}return r}function h(e,t){var n,i=t.match(f),s=0;i&&(s=parseInt(i[0],10),isNaN(s)&&(s=0));try{n=r(e,null,s)}catch(o){throw new Error("stringExtended.format : Unable to parse json from ",e)}return n}function v(e,t,n,r){e=""+e,n=n||" ";var i=e.length;while(i<t)r?e+=n:e=n+e,i++;return e}function m(e,n,r){var i=e;if(t.isString(i)){if(e.length>n)if(r){var s=e.length;i=e.substring(s-n,s)}else i=e.substring(0,n)}else i=m(""+i,n);return i}function g(e,a){if(a instanceof Array){var f=0,p=a.length;return e.replace(o,function(e,t,i){var s,o;if(f<p){s=a[f++];if(e==="%s"||e==="%d"||e==="%D")o=s+"";else if(e==="%Z")o=s.toUTCString();else if(e==="%j")try{o=r(s)}catch(u){throw new Error("stringExtended.format : Unable to parse json from ",s)}else{t=t.replace(/^\[|\]$/g,"");switch(i){case"s":o=l(s,t);break;case"d":o=c(s,t);break;case"j":o=h(s,t);break;case"D":o=n.format(s,t);break;case"Z":o=n.format(s,t,!0)}}return o}return e})}if(i(a))return e.replace(u,function(e,r,i){i=a[i];if(!t.isUndefined(i)){if(!r)return""+i;if(t.isString(i))return l(i,r);if(t.isNumber(i))return c(i,r);if(t.isDate(i))return n.format(i,r);if(t.isObject(i))return h(i,r)}return e});var d=s.call(arguments).slice(1);return g(e,d)}function y(e,t){var n=[];return e&&(e.indexOf(t)>0?n=e.replace(/\s+/g,"").split(t):n.push(e)),n}function b(e,t){var n=[];if(t)for(var r=0;r<t;r++)n.push(e);return n.join("")}function w(e,n){var r,i,s;if(n)if(t.isArray(e)){r=[];for(i=0,s=e.length;i<s;i++)r.push(w(e[i],n))}else if(n instanceof Array){r=e;for(i=0,s=n.length;i<s;i++)r=w(r,n[i])}else n in p&&(r="["+p[n]+"m"+e+"");return r}var r;typeof JSON=="undefined"?function(){function e(e){return e<10?"0"+e:e}function i(r){return t.isDate(r)?isFinite(r.valueOf())?r.getUTCFullYear()+"-"+e(r.getUTCMonth()+1)+"-"+e(r.getUTCDate())+"T"+e(r.getUTCHours())+":"+e(r.getUTCMinutes())+":"+e(r.getUTCSeconds())+"Z":null:n(r)?r.valueOf():r}function c(e){return o.lastIndex=0,o.test(e)?'"'+e.replace(o,function(e){var t=f[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function h(e,t){var n,r,s,o,f=u,p,d=t[e];d&&(d=i(d)),typeof l=="function"&&(d=l.call(t,e,d));switch(typeof d){case"string":return c(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";u+=a,p=[];if(Object.prototype.toString.apply(d)==="[object Array]"){o=d.length;for(n=0;n<o;n+=1)p[n]=h(n,d)||"null";return s=p.length===0?"[]":u?"[\n"+u+p.join(",\n"+u)+"\n"+f+"]":"["+p.join(",")+"]",u=f,s}if(l&&typeof l=="object"){o=l.length;for(n=0;n<o;n+=1)typeof l[n]=="string"&&(r=l[n],s=h(r,d),s&&p.push(c(r)+(u?": ":":")+s))}else for(r in d)Object.prototype.hasOwnProperty.call(d,r)&&(s=h(r,d),s&&p.push(c(r)+(u?": ":":")+s));return s=p.length===0?"{}":u?"{\n"+u+p.join(",\n"+u)+"\n"+f+"}":"{"+p.join(",")+"}",u=f,s}}var n=t.tester().isString().isNumber().isBoolean().tester(),s=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,u,a,f={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},l;r=function(e,t,n){var r;u="",a="";if(typeof n=="number")for(r=0;r<n;r+=1)a+=" ";else typeof n=="string"&&(a=n);l=t;if(!t||typeof t=="function"||typeof t=="object"&&typeof t.length=="number")return h("",{"":e});throw new Error("JSON.stringify")}}():r=JSON.stringify;var i=t.isHash,s=Array.prototype.slice,o=/%((?:-?\+?.?\d*)?|(?:\[[^\[|\]]*\]))?([sjdDZ])/g,u=/\{(?:\[([^\[|\]]*)\])?(\w+)\}/g,a=/(-?)(\+?)([A-Z|a-z|\W]?)([1-9][0-9]*)?$/,f=/([1-9][0-9]*)$/g,p={bold:1,bright:1,italic:3,underline:4,blink:5,inverse:7,crossedOut:9,red:31,green:32,yellow:33,blue:34,magenta:35,cyan:36,white:37,redBackground:41,greenBackground:42,yellowBackground:43,blueBackground:44,magentaBackground:45,cyanBackground:46,whiteBackground:47,encircled:52,overlined:53,grey:90,black:90},d={SMILEY:"☺",SOLID_SMILEY:"☻",HEART:"♥",DIAMOND:"♦",CLOVE:"♣",SPADE:"♠",DOT:"•",SQUARE_CIRCLE:"◘",CIRCLE:"○",FILLED_SQUARE_CIRCLE:"◙",MALE:"♂",FEMALE:"♀",EIGHT_NOTE:"♪",DOUBLE_EIGHTH_NOTE:"♫",SUN:"☼",PLAY:"►",REWIND:"◄",UP_DOWN:"↕",PILCROW:"¶",SECTION:"§",THICK_MINUS:"▬",SMALL_UP_DOWN:"↨",UP_ARROW:"↑",DOWN_ARROW:"↓",RIGHT_ARROW:"→",LEFT_ARROW:"←",RIGHT_ANGLE:"∟",LEFT_RIGHT_ARROW:"↔",TRIANGLE:"▲",DOWN_TRIANGLE:"▼",HOUSE:"⌂",C_CEDILLA:"Ç",U_UMLAUT:"ü",E_ACCENT:"é",A_LOWER_CIRCUMFLEX:"â",A_LOWER_UMLAUT:"ä",A_LOWER_GRAVE_ACCENT:"à",A_LOWER_CIRCLE_OVER:"å",C_LOWER_CIRCUMFLEX:"ç",E_LOWER_CIRCUMFLEX:"ê",E_LOWER_UMLAUT:"ë",E_LOWER_GRAVE_ACCENT:"è",I_LOWER_UMLAUT:"ï",I_LOWER_CIRCUMFLEX:"î",I_LOWER_GRAVE_ACCENT:"ì",A_UPPER_UMLAUT:"Ä",A_UPPER_CIRCLE:"Å",E_UPPER_ACCENT:"É",A_E_LOWER:"æ",A_E_UPPER:"Æ",O_LOWER_CIRCUMFLEX:"ô",O_LOWER_UMLAUT:"ö",O_LOWER_GRAVE_ACCENT:"ò",U_LOWER_CIRCUMFLEX:"û",U_LOWER_GRAVE_ACCENT:"ù",Y_LOWER_UMLAUT:"ÿ",O_UPPER_UMLAUT:"Ö",U_UPPER_UMLAUT:"Ü",CENTS:"¢",POUND:"£",YEN:"¥",CURRENCY:"¤",PTS:"₧",FUNCTION:"ƒ",A_LOWER_ACCENT:"á",I_LOWER_ACCENT:"í",O_LOWER_ACCENT:"ó",U_LOWER_ACCENT:"ú",N_LOWER_TILDE:"ñ",N_UPPER_TILDE:"Ñ",A_SUPER:"ª",O_SUPER:"º",UPSIDEDOWN_QUESTION:"¿",SIDEWAYS_L:"⌐",NEGATION:"¬",ONE_HALF:"½",ONE_FOURTH:"¼",UPSIDEDOWN_EXCLAMATION:"¡",DOUBLE_LEFT:"«",DOUBLE_RIGHT:"»",LIGHT_SHADED_BOX:"░",MEDIUM_SHADED_BOX:"▒",DARK_SHADED_BOX:"▓",VERTICAL_LINE:"│",MAZE__SINGLE_RIGHT_T:"┤",MAZE_SINGLE_RIGHT_TOP:"┐",MAZE_SINGLE_RIGHT_BOTTOM_SMALL:"┘",MAZE_SINGLE_LEFT_TOP_SMALL:"┌",MAZE_SINGLE_LEFT_BOTTOM_SMALL:"└",MAZE_SINGLE_LEFT_T:"├",MAZE_SINGLE_BOTTOM_T:"┴",MAZE_SINGLE_TOP_T:"┬",MAZE_SINGLE_CENTER:"┼",MAZE_SINGLE_HORIZONTAL_LINE:"─",MAZE_SINGLE_RIGHT_DOUBLECENTER_T:"╡",MAZE_SINGLE_RIGHT_DOUBLE_BL:"╛",MAZE_SINGLE_RIGHT_DOUBLE_T:"╢",MAZE_SINGLE_RIGHT_DOUBLEBOTTOM_TOP:"╖",MAZE_SINGLE_RIGHT_DOUBLELEFT_TOP:"╕",MAZE_SINGLE_LEFT_DOUBLE_T:"╞",MAZE_SINGLE_BOTTOM_DOUBLE_T:"╧",MAZE_SINGLE_TOP_DOUBLE_T:"╤",MAZE_SINGLE_TOP_DOUBLECENTER_T:"╥",MAZE_SINGLE_BOTTOM_DOUBLECENTER_T:"╨",MAZE_SINGLE_LEFT_DOUBLERIGHT_BOTTOM:"╘",MAZE_SINGLE_LEFT_DOUBLERIGHT_TOP:"╒",MAZE_SINGLE_LEFT_DOUBLEBOTTOM_TOP:"╓",MAZE_SINGLE_LEFT_DOUBLETOP_BOTTOM:"╙",MAZE_SINGLE_LEFT_TOP:"Γ",MAZE_SINGLE_RIGHT_BOTTOM:"╜",MAZE_SINGLE_LEFT_CENTER:"╟",MAZE_SINGLE_DOUBLECENTER_CENTER:"╫",MAZE_SINGLE_DOUBLECROSS_CENTER:"╪",MAZE_DOUBLE_LEFT_CENTER:"╣",MAZE_DOUBLE_VERTICAL:"║",MAZE_DOUBLE_RIGHT_TOP:"╗",MAZE_DOUBLE_RIGHT_BOTTOM:"╝",MAZE_DOUBLE_LEFT_BOTTOM:"╚",MAZE_DOUBLE_LEFT_TOP:"╔",MAZE_DOUBLE_BOTTOM_T:"╩",MAZE_DOUBLE_TOP_T:"╦",MAZE_DOUBLE_LEFT_T:"╠",MAZE_DOUBLE_HORIZONTAL:"═",MAZE_DOUBLE_CROSS:"╬",SOLID_RECTANGLE:"█",THICK_LEFT_VERTICAL:"▌",THICK_RIGHT_VERTICAL:"▐",SOLID_SMALL_RECTANGLE_BOTTOM:"▄",SOLID_SMALL_RECTANGLE_TOP:"▀",PHI_UPPER:"Φ",INFINITY:"∞",INTERSECTION:"∩",DEFINITION:"≡",PLUS_MINUS:"±",GT_EQ:"≥",LT_EQ:"≤",THEREFORE:"⌠",SINCE:"∵",DOESNOT_EXIST:"∄",EXISTS:"∃",FOR_ALL:"∀",EXCLUSIVE_OR:"⊕",BECAUSE:"⌡",DIVIDE:"÷",APPROX:"≈",DEGREE:"°",BOLD_DOT:"∙",DOT_SMALL:"·",CHECK:"√",ITALIC_X:"✗",SUPER_N:"ⁿ",SQUARED:"²",CUBED:"³",SOLID_BOX:"■",PERMILE:"‰",REGISTERED_TM:"®",COPYRIGHT:"©",TRADEMARK:"™",BETA:"β",GAMMA:"γ",ZETA:"ζ",ETA:"η",IOTA:"ι",KAPPA:"κ",LAMBDA:"λ",NU:"ν",XI:"ξ",OMICRON:"ο",RHO:"ρ",UPSILON:"υ",CHI_LOWER:"φ",CHI_UPPER:"χ",PSI:"ψ",ALPHA:"α",ESZETT:"ß",PI:"π",SIGMA_UPPER:"Σ",SIGMA_LOWER:"σ",MU:"µ",TAU:"τ",THETA:"Θ",OMEGA:"Ω",DELTA:"δ",PHI_LOWER:"φ",EPSILON:"ε"},E={toArray:y,pad:v,truncate:m,multiply:b,format:g,style:w},S,x=e.define(t.isString,E).define(t.isArray,{style:w});for(S in E)E.hasOwnProperty(S)&&(x[S]=E[S]);return x.characters=d,x}"undefined"!=typeof exports?"undefined"!=typeof module&&module.exports&&(module.exports=e(require("extended"),require("is-extended"),require("date-extended"))):"function"==typeof define?define(["require"],function(t){return e(t("extended"),t("is-extended"),t("date-extended"))}):this.stringExtended=e(this.extended,this.isExtended,this.dateExtended)}).call(this);
(function(){"use strict";function E(E,_,e){function r(E,_){var e=E;if(N.test(_)){var r=_.match(N),t=r[1],n=r[3],O=r[4];O&&(O=parseInt(O,10),e=O>e.length?T(e,O,n,t):L(e,O))}return e}function t(E,e){var r;if(!_.isNumber(E))throw Error("stringExtended.format : when using %d the parameter must be a number!");if(r=""+E,N.test(e)){var t=e.match(N),n=t[1],O=t[2],A=t[3],i=t[4];O&&(r=(E>0?"+":"")+r),i&&(i=parseInt(i,10),r=i>r.length?T(r,i,A||"0",n):L(r,i))}return r}function n(E,_){var e,r=_.match(U),t=0;r&&(t=parseInt(r[0],10),isNaN(t)&&(t=0));try{e=R(E,null,t)}catch(n){throw Error("stringExtended.format : Unable to parse json from ",E)}return e}function T(E,_,e,r){E=""+E,e=e||" ";for(var t=E.length;_>t;)r?E+=e:E=e+E,t++;return E}function L(E,e,r){var t=E;if(_.isString(t)){if(E.length>e)if(r){var n=E.length;t=E.substring(n-e,n)}else t=E.substring(0,e)}else t=L(""+t,e);return t}function O(E,T){if(T instanceof Array){var L=0,A=T.length;return E.replace(a,function(E,_,O){var i,I;if(!(A>L))return E;if(i=T[L++],"%s"===E||"%d"===E||"%D"===E)I=i+"";else if("%Z"===E)I=i.toUTCString();else if("%j"===E)try{I=R(i)}catch(u){throw Error("stringExtended.format : Unable to parse json from ",i)}else switch(_=_.replace(/^\[|\]$/g,""),O){case"s":I=r(i,_);break;case"d":I=t(i,_);break;case"j":I=n(i,_);break;case"D":I=e.format(i,_);break;case"Z":I=e.format(i,_,!0)}return I})}if(o(T))return E.replace(s,function(E,L,O){if(O=T[O],!_.isUndefined(O)){if(!L)return""+O;if(_.isString(O))return r(O,L);if(_.isNumber(O))return t(O,L);if(_.isDate(O))return e.format(O,L);if(_.isObject(O))return n(O,L)}return E});var i=f.call(arguments).slice(1);return O(E,i)}function A(E,_){var e=[];return E&&(E.indexOf(_)>0?e=E.replace(/\s+/g,"").split(_):e.push(E)),e}function i(E,_){var e=[];if(_)for(var r=0;_>r;r++)e.push(E);return e.join("")}function I(E,e){var r,t,n;if(e)if(_.isArray(E))for(r=[],t=0,n=E.length;n>t;t++)r.push(I(E[t],e));else if(e instanceof Array)for(r=E,t=0,n=e.length;n>t;t++)r=I(r,e[t]);else e in M&&(r="["+M[e]+"m"+E+"");return r}var R;"undefined"==typeof JSON?function(){function E(E){return 10>E?"0"+E:E}function e(e){return _.isDate(e)?isFinite(e.valueOf())?e.getUTCFullYear()+"-"+E(e.getUTCMonth()+1)+"-"+E(e.getUTCDate())+"T"+E(e.getUTCHours())+":"+E(e.getUTCMinutes())+":"+E(e.getUTCSeconds())+"Z":null:O(e)?e.valueOf():e}function r(E){return A.lastIndex=0,A.test(E)?'"'+E.replace(A,function(E){var _=i[E];return"string"==typeof _?_:"\\u"+("0000"+E.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+E+'"'}function t(E,_){var O,A,i,I,R,u=n,o=_[E];switch(o&&(o=e(o)),"function"==typeof L&&(o=L.call(_,E,o)),typeof o){case"string":return r(o);case"number":return isFinite(o)?o+"":"null";case"boolean":case"null":return o+"";case"object":if(!o)return"null";if(n+=T,R=[],"[object Array]"===Object.prototype.toString.apply(o)){for(I=o.length,O=0;I>O;O+=1)R[O]=t(O,o)||"null";return i=0===R.length?"[]":n?"[\n"+n+R.join(",\n"+n)+"\n"+u+"]":"["+R.join(",")+"]",n=u,i}if(L&&"object"==typeof L)for(I=L.length,O=0;I>O;O+=1)"string"==typeof L[O]&&(A=L[O],i=t(A,o),i&&R.push(r(A)+(n?": ":":")+i));else for(A in o)Object.prototype.hasOwnProperty.call(o,A)&&(i=t(A,o),i&&R.push(r(A)+(n?": ":":")+i));return i=0===R.length?"{}":n?"{\n"+n+R.join(",\n"+n)+"\n"+u+"}":"{"+R.join(",")+"}",n=u,i}}var n,T,L,O=_.tester().isString().isNumber().isBoolean().tester(),A=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};R=function(E,_,e){var r;if(n="",T="","number"==typeof e)for(r=0;e>r;r+=1)T+=" ";else"string"==typeof e&&(T=e);if(L=_,_&&"function"!=typeof _&&("object"!=typeof _||"number"!=typeof _.length))throw Error("JSON.stringify");return t("",{"":E})}}():R=JSON.stringify;var u,o=_.isHash,f=Array.prototype.slice,a=/%((?:-?\+?.?\d*)?|(?:\[[^\[|\]]*\]))?([sjdDZ])/g,s=/\{(?:\[([^\[|\]]*)\])?(\w+)\}/g,N=/(-?)(\+?)([A-Z|a-z|\W]?)([1-9][0-9]*)?$/,U=/([1-9][0-9]*)$/g,M={bold:1,bright:1,italic:3,underline:4,blink:5,inverse:7,crossedOut:9,red:31,green:32,yellow:33,blue:34,magenta:35,cyan:36,white:37,redBackground:41,greenBackground:42,yellowBackground:43,blueBackground:44,magentaBackground:45,cyanBackground:46,whiteBackground:47,encircled:52,overlined:53,grey:90,black:90},C={SMILEY:"☺",SOLID_SMILEY:"☻",HEART:"♥",DIAMOND:"♦",CLOVE:"♣",SPADE:"♠",DOT:"•",SQUARE_CIRCLE:"◘",CIRCLE:"○",FILLED_SQUARE_CIRCLE:"◙",MALE:"♂",FEMALE:"♀",EIGHT_NOTE:"♪",DOUBLE_EIGHTH_NOTE:"♫",SUN:"☼",PLAY:"►",REWIND:"◄",UP_DOWN:"↕",PILCROW:"¶",SECTION:"§",THICK_MINUS:"▬",SMALL_UP_DOWN:"↨",UP_ARROW:"↑",DOWN_ARROW:"↓",RIGHT_ARROW:"→",LEFT_ARROW:"←",RIGHT_ANGLE:"∟",LEFT_RIGHT_ARROW:"↔",TRIANGLE:"▲",DOWN_TRIANGLE:"▼",HOUSE:"⌂",C_CEDILLA:"Ç",U_UMLAUT:"ü",E_ACCENT:"é",A_LOWER_CIRCUMFLEX:"â",A_LOWER_UMLAUT:"ä",A_LOWER_GRAVE_ACCENT:"à",A_LOWER_CIRCLE_OVER:"å",C_LOWER_CIRCUMFLEX:"ç",E_LOWER_CIRCUMFLEX:"ê",E_LOWER_UMLAUT:"ë",E_LOWER_GRAVE_ACCENT:"è",I_LOWER_UMLAUT:"ï",I_LOWER_CIRCUMFLEX:"î",I_LOWER_GRAVE_ACCENT:"ì",A_UPPER_UMLAUT:"Ä",A_UPPER_CIRCLE:"Å",E_UPPER_ACCENT:"É",A_E_LOWER:"æ",A_E_UPPER:"Æ",O_LOWER_CIRCUMFLEX:"ô",O_LOWER_UMLAUT:"ö",O_LOWER_GRAVE_ACCENT:"ò",U_LOWER_CIRCUMFLEX:"û",U_LOWER_GRAVE_ACCENT:"ù",Y_LOWER_UMLAUT:"ÿ",O_UPPER_UMLAUT:"Ö",U_UPPER_UMLAUT:"Ü",CENTS:"¢",POUND:"£",YEN:"¥",CURRENCY:"¤",PTS:"₧",FUNCTION:"ƒ",A_LOWER_ACCENT:"á",I_LOWER_ACCENT:"í",O_LOWER_ACCENT:"ó",U_LOWER_ACCENT:"ú",N_LOWER_TILDE:"ñ",N_UPPER_TILDE:"Ñ",A_SUPER:"ª",O_SUPER:"º",UPSIDEDOWN_QUESTION:"¿",SIDEWAYS_L:"⌐",NEGATION:"¬",ONE_HALF:"½",ONE_FOURTH:"¼",UPSIDEDOWN_EXCLAMATION:"¡",DOUBLE_LEFT:"«",DOUBLE_RIGHT:"»",LIGHT_SHADED_BOX:"░",MEDIUM_SHADED_BOX:"▒",DARK_SHADED_BOX:"▓",VERTICAL_LINE:"│",MAZE__SINGLE_RIGHT_T:"┤",MAZE_SINGLE_RIGHT_TOP:"┐",MAZE_SINGLE_RIGHT_BOTTOM_SMALL:"┘",MAZE_SINGLE_LEFT_TOP_SMALL:"┌",MAZE_SINGLE_LEFT_BOTTOM_SMALL:"└",MAZE_SINGLE_LEFT_T:"├",MAZE_SINGLE_BOTTOM_T:"┴",MAZE_SINGLE_TOP_T:"┬",MAZE_SINGLE_CENTER:"┼",MAZE_SINGLE_HORIZONTAL_LINE:"─",MAZE_SINGLE_RIGHT_DOUBLECENTER_T:"╡",MAZE_SINGLE_RIGHT_DOUBLE_BL:"╛",MAZE_SINGLE_RIGHT_DOUBLE_T:"╢",MAZE_SINGLE_RIGHT_DOUBLEBOTTOM_TOP:"╖",MAZE_SINGLE_RIGHT_DOUBLELEFT_TOP:"╕",MAZE_SINGLE_LEFT_DOUBLE_T:"╞",MAZE_SINGLE_BOTTOM_DOUBLE_T:"╧",MAZE_SINGLE_TOP_DOUBLE_T:"╤",MAZE_SINGLE_TOP_DOUBLECENTER_T:"╥",MAZE_SINGLE_BOTTOM_DOUBLECENTER_T:"╨",MAZE_SINGLE_LEFT_DOUBLERIGHT_BOTTOM:"╘",MAZE_SINGLE_LEFT_DOUBLERIGHT_TOP:"╒",MAZE_SINGLE_LEFT_DOUBLEBOTTOM_TOP:"╓",MAZE_SINGLE_LEFT_DOUBLETOP_BOTTOM:"╙",MAZE_SINGLE_LEFT_TOP:"Γ",MAZE_SINGLE_RIGHT_BOTTOM:"╜",MAZE_SINGLE_LEFT_CENTER:"╟",MAZE_SINGLE_DOUBLECENTER_CENTER:"╫",MAZE_SINGLE_DOUBLECROSS_CENTER:"╪",MAZE_DOUBLE_LEFT_CENTER:"╣",MAZE_DOUBLE_VERTICAL:"║",MAZE_DOUBLE_RIGHT_TOP:"╗",MAZE_DOUBLE_RIGHT_BOTTOM:"╝",MAZE_DOUBLE_LEFT_BOTTOM:"╚",MAZE_DOUBLE_LEFT_TOP:"╔",MAZE_DOUBLE_BOTTOM_T:"╩",MAZE_DOUBLE_TOP_T:"╦",MAZE_DOUBLE_LEFT_T:"╠",MAZE_DOUBLE_HORIZONTAL:"═",MAZE_DOUBLE_CROSS:"╬",SOLID_RECTANGLE:"█",THICK_LEFT_VERTICAL:"▌",THICK_RIGHT_VERTICAL:"▐",SOLID_SMALL_RECTANGLE_BOTTOM:"▄",SOLID_SMALL_RECTANGLE_TOP:"▀",PHI_UPPER:"Φ",INFINITY:"∞",INTERSECTION:"∩",DEFINITION:"≡",PLUS_MINUS:"±",GT_EQ:"≥",LT_EQ:"≤",THEREFORE:"⌠",SINCE:"∵",DOESNOT_EXIST:"∄",EXISTS:"∃",FOR_ALL:"∀",EXCLUSIVE_OR:"⊕",BECAUSE:"⌡",DIVIDE:"÷",APPROX:"≈",DEGREE:"°",BOLD_DOT:"∙",DOT_SMALL:"·",CHECK:"√",ITALIC_X:"✗",SUPER_N:"ⁿ",SQUARED:"²",CUBED:"³",SOLID_BOX:"■",PERMILE:"‰",REGISTERED_TM:"®",COPYRIGHT:"©",TRADEMARK:"™",BETA:"β",GAMMA:"γ",ZETA:"ζ",ETA:"η",IOTA:"ι",KAPPA:"κ",LAMBDA:"λ",NU:"ν",XI:"ξ",OMICRON:"ο",RHO:"ρ",UPSILON:"υ",CHI_LOWER:"φ",CHI_UPPER:"χ",PSI:"ψ",ALPHA:"α",ESZETT:"ß",PI:"π",SIGMA_UPPER:"Σ",SIGMA_LOWER:"σ",MU:"µ",TAU:"τ",THETA:"Θ",OMEGA:"Ω",DELTA:"δ",PHI_LOWER:"φ",EPSILON:"ε"},S={toArray:A,pad:T,truncate:L,multiply:i,format:O,style:I},c=E.define(_.isString,S).define(_.isArray,{style:I});for(u in S)S.hasOwnProperty(u)&&(c[u]=S[u]);return c.characters=C,c}"undefined"!=typeof exports?"undefined"!=typeof module&&module.exports&&(module.exports=E(require("extended"),require("is-extended"),require("date-extended"))):"function"==typeof define?define(["extended","is-extended","date-extended"],function(_,e,r){return E(_,e,r)}):this.stringExtended=E(this.extended,this.isExtended,this.dateExtended)}).call(this);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc