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.7 to 0.0.8

84

package.json
{
"name": "string-extended",
"version": "0.0.7",
"description": "Additional string extensions with a chainable api",
"main": "index.js",
"scripts": {
"test": "it -r dot"
},
"repository": {
"type": "git",
"url": "git:git@github.com:doug-martin/string-extended.git"
},
"keywords": [
"String",
"extender",
"utilities"
],
"testling": {
"files": "test/browserling.js",
"browsers": [
"ie/8..latest",
"chrome/20..latest",
"firefox/14..latest",
"safari/latest",
"iphone/6",
"ipad/6"
]
},
"author": "Doug Martin",
"license": "MIT",
"dependencies": {
"extended": "~0.0.3",
"is-extended": "~0.0.3",
"date-extended": "~0.0.3",
"grunt": "~0.4.1",
"array-extended": "~0.0.5"
},
"devDependencies": {
"it": "~0.2.0",
"grunt-it": "~0.3.0",
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-jshint": "~0.4.3"
}
"name": "string-extended",
"version": "0.0.8",
"description": "Additional string extensions with a chainable api",
"main": "index.js",
"scripts": {
"test": "it -r dot"
},
"repository": {
"type": "git",
"url": "git:git@github.com:doug-martin/string-extended.git"
},
"keywords": [
"String",
"extender",
"utilities"
],
"testling": {
"files": "test/browserling.js",
"browsers": [
"ie/8..latest",
"chrome/20..latest",
"firefox/14..latest",
"safari/latest",
"iphone/6",
"ipad/6"
]
},
"author": "Doug Martin",
"license": "MIT",
"dependencies": {
"extended": "~0.0.3",
"is-extended": "~0.0.3",
"date-extended": "~0.0.3",
"array-extended": "~0.0.5"
},
"devDependencies": {
"it": "~0.2.0",
"grunt": "~0.4.1",
"grunt-it": "~0.3.0",
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-jshint": "~0.4.3"
}
}

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

/*! string-extended - v0.0.7 - 2013-06-06
* Copyright (c) 2013 Doug Martin; Licensed MIT */
/*! string-extended - v0.0.8 - 2014-03-28
* Copyright (c) 2014 Doug Martin; Licensed MIT */
!function(){"use strict";function a(a,b,c,d){function e(a,b){var c=a;if(x.test(b)){var d=b.match(x),e=d[1],f=d[3],g=d[4];g&&(g=parseInt(g,10),c=c.length<g?h(c,g,f,e):i(c,g))}return c}function f(a,c){var d;if(!b.isNumber(a))throw new Error("stringExtended.format : when using %d the parameter must be a number!");if(d=""+a,x.test(c)){var e=c.match(x),f=e[1],g=e[2],j=e[3],k=e[4];g&&(d=(a>0?"+":"")+d),k&&(k=parseInt(k,10),d=d.length<k?h(d,k,j||"0",f):i(d,k))}return d}function g(a,b){var c,d=b.match(y),e=0;d&&(e=parseInt(d[0],10),isNaN(e)&&(e=0));try{c=s(a,null,e)}catch(f){throw new Error("stringExtended.format : Unable to parse json from ",a)}return c}function h(a,b,c,d){a=""+a,c=c||" ";for(var e=a.length;b>e;)d?a+=c:a=c+a,e++;return a}function i(a,c,d){var e=a;if(b.isString(e)){if(a.length>c)if(d){var f=a.length;e=a.substring(f-c,f)}else e=a.substring(0,c)}else e=i(""+e,c);return e}function j(a,d){if(d instanceof Array){var h=0,i=d.length;return a.replace(v,function(a,b,j){var k,l;if(!(i>h))return a;if(k=d[h++],"%s"===a||"%d"===a||"%D"===a)l=k+"";else if("%Z"===a)l=k.toUTCString();else if("%j"===a)try{l=s(k)}catch(m){throw new Error("stringExtended.format : Unable to parse json from ",k)}else switch(b=b.replace(/^\[|\]$/g,""),j){case"s":l=e(k,b);break;case"d":l=f(k,b);break;case"j":l=g(k,b);break;case"D":l=c.format(k,b);break;case"Z":l=c.format(k,b,!0)}return l})}if(t(d))return a.replace(w,function(a,h,i){if(i=d[i],!b.isUndefined(i)){if(!h)return""+i;if(b.isString(i))return e(i,h);if(b.isNumber(i))return f(i,h);if(b.isDate(i))return c.format(i,h);if(b.isObject(i))return g(i,h)}return a});var k=u.call(arguments).slice(1);return j(a,k)}function k(a,b){var c=[];return a&&(a.indexOf(b)>0?c=a.replace(/\s+/g,"").split(b):c.push(a)),c}function l(a,b){var c=[];if(b)for(var d=0;b>d;d++)c.push(a);return c.join("")}function m(a,c){var d,e,f;if(c)if(b.isArray(a))for(d=[],e=0,f=a.length;f>e;e++)d.push(m(a[e],c));else if(c instanceof Array)for(d=a,e=0,f=c.length;f>e;e++)d=m(d,c[e]);else c in z&&(d="["+z[c]+"m"+a+"");return d}function n(a,b){return a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(a){return b&&-1!==d.indexOf(b,a)?a:"\\"+a})}function o(a){return a.replace(/^\s*|\s*$/g,"")}function p(a){return a.replace(/^\s*/,"")}function q(a){return a.replace(/\s*$/,"")}function r(a){return 0===a.length}var s;"undefined"==typeof JSON?function(){function a(a){return 10>a?"0"+a:a}function c(c){return b.isDate(c)?isFinite(c.valueOf())?c.getUTCFullYear()+"-"+a(c.getUTCMonth()+1)+"-"+a(c.getUTCDate())+"T"+a(c.getUTCHours())+":"+a(c.getUTCMinutes())+":"+a(c.getUTCSeconds())+"Z":null:i(c)?c.valueOf():c}function d(a){return j.lastIndex=0,j.test(a)?'"'+a.replace(j,function(a){var b=k[a];return"string"==typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function e(a,b){var i,j,k,l,m,n=f,o=b[a];switch(o&&(o=c(o)),"function"==typeof h&&(o=h.call(b,a,o)),typeof o){case"string":return d(o);case"number":return isFinite(o)?String(o):"null";case"boolean":case"null":return String(o);case"object":if(!o)return"null";if(f+=g,m=[],"[object Array]"===Object.prototype.toString.apply(o)){for(l=o.length,i=0;l>i;i+=1)m[i]=e(i,o)||"null";return k=0===m.length?"[]":f?"[\n"+f+m.join(",\n"+f)+"\n"+n+"]":"["+m.join(",")+"]",f=n,k}if(h&&"object"==typeof h)for(l=h.length,i=0;l>i;i+=1)"string"==typeof h[i]&&(j=h[i],k=e(j,o),k&&m.push(d(j)+(f?": ":":")+k));else for(j in o)Object.prototype.hasOwnProperty.call(o,j)&&(k=e(j,o),k&&m.push(d(j)+(f?": ":":")+k));return k=0===m.length?"{}":f?"{\n"+f+m.join(",\n"+f)+"\n"+n+"}":"{"+m.join(",")+"}",f=n,k}}var f,g,h,i=b.tester().isString().isNumber().isBoolean().tester(),j=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,k={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};s=function(a,b,c){var d;if(f="",g="","number"==typeof c)for(d=0;c>d;d+=1)g+=" ";else"string"==typeof c&&(g=c);if(h=b,b&&"function"!=typeof b&&("object"!=typeof b||"number"!=typeof b.length))throw new Error("JSON.stringify");return e("",{"":a})}}():s=JSON.stringify;var t=b.isHash,u=Array.prototype.slice,v=/%((?:-?\+?.?\d*)?|(?:\[[^\[|\]]*\]))?([sjdDZ])/g,w=/\{(?:\[([^\[|\]]*)\])?(\w+)\}/g,x=/(-?)(\+?)([A-Z|a-z|\W]?)([1-9][0-9]*)?$/,y=/([1-9][0-9]*)$/g,z={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},A={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:"ε"},B={toArray:k,pad:h,truncate:i,multiply:l,format:j,style:m,escape:n,trim:o,trimLeft:p,trimRight:q,isEmpty:r};return a.define(b.isString,B).define(b.isArray,{style:m}).expose(B).expose({characters:A})}"undefined"!=typeof exports?"undefined"!=typeof module&&module.exports&&(module.exports=a(require("extended"),require("is-extended"),require("date-extended"),require("array-extended"))):"function"==typeof define&&define.amd?define(["extended","is-extended","date-extended","array-extended"],function(b,c,d,e){return a(b,c,d,e)}):this.stringExtended=a(this.extended,this.isExtended,this.dateExtended,this.arrayExtended)}.call(this);

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