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

underscore.string

Package Overview
Dependencies
Maintainers
4
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

underscore.string - npm Package Compare versions

Comparing version 3.1.1 to 3.2.0

cleanDiacritics.js

2

bower.json
{
"name": "underscore.string",
"version": "3.1.1",
"version": "3.2.0",
"description": "String manipulation extensions for Underscore.js javascript library.",

@@ -5,0 +5,0 @@ "homepage": "http://epeli.github.com/underscore.string/",

var trim = require('./trim');
module.exports = function clean(str) {
return trim(str).replace(/\s+/g, ' ');
return trim(str).replace(/\s\s+/g, ' ');
};

@@ -5,3 +5,3 @@ {

"description": "String manipulation extensions for Underscore.js javascript library",
"version": "3.1.1",
"version": "3.2.0",
"keywords": [

@@ -8,0 +8,0 @@ "underscore",

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

/* underscore.string 3.2.0 | MIT licensed | http://epeli.github.com/underscore.string/ */
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.s=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){

@@ -17,3 +19,3 @@ var trim = _dereq_('./trim');

},{"./decapitalize":9,"./trim":61}],2:[function(_dereq_,module,exports){
},{"./decapitalize":10,"./trim":62}],2:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -28,3 +30,3 @@

},{"./helper/makeString":20}],3:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],3:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -36,3 +38,3 @@

},{"./helper/makeString":20}],4:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],4:[function(_dereq_,module,exports){
module.exports = function chop(str, step) {

@@ -55,12 +57,29 @@ if (str == null) return [];

},{"./camelize":1,"./capitalize":2,"./helper/makeString":20}],6:[function(_dereq_,module,exports){
},{"./camelize":1,"./capitalize":2,"./helper/makeString":21}],6:[function(_dereq_,module,exports){
var trim = _dereq_('./trim');
module.exports = function clean(str) {
return trim(str).replace(/\s+/g, ' ');
return trim(str).replace(/\s\s+/g, ' ');
};
},{"./trim":61}],7:[function(_dereq_,module,exports){
},{"./trim":62}],7:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');
var from = "ąàáäâãåæăćčĉęèéëêĝĥìíïîĵłľńňòóöőôõðøśșšŝťțŭùúüűûñÿýçżźž",
to = "aaaaaaaaaccceeeeeghiiiijllnnoooooooossssttuuuuuunyyczzz";
from += from.toUpperCase();
to += to.toUpperCase();
module.exports = function cleanDiacritics(str) {
return makeString(str).replace(/.{1}/g, function(c){
var index = from.indexOf(c);
return index === -1 ? c : to.charAt(index);
});
};
},{"./helper/makeString":21}],8:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');
module.exports = function(str, substr) {

@@ -75,3 +94,3 @@ str = makeString(str);

},{"./helper/makeString":20}],8:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],9:[function(_dereq_,module,exports){
var trim = _dereq_('./trim');

@@ -83,3 +102,3 @@

},{"./trim":61}],9:[function(_dereq_,module,exports){
},{"./trim":62}],10:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -92,3 +111,3 @@

},{"./helper/makeString":20}],10:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],11:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -123,3 +142,3 @@

},{"./helper/makeString":20}],11:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],12:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -139,3 +158,3 @@ var toPositive = _dereq_('./helper/toPositive');

},{"./helper/makeString":20,"./helper/toPositive":22}],12:[function(_dereq_,module,exports){
},{"./helper/makeString":21,"./helper/toPositive":23}],13:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -160,3 +179,3 @@ var escapeChars = _dereq_('./helper/escapeChars');

},{"./helper/escapeChars":17,"./helper/makeString":20}],13:[function(_dereq_,module,exports){
},{"./helper/escapeChars":18,"./helper/makeString":21}],14:[function(_dereq_,module,exports){
module.exports = function() {

@@ -173,3 +192,3 @@ var result = {};

},{}],14:[function(_dereq_,module,exports){
},{}],15:[function(_dereq_,module,exports){
// Underscore.string

@@ -180,3 +199,3 @@ // (c) 2010 Esa-Matti Suuronen <esa-matti aet suuronen dot org>

// Some code is borrowed from MooTools and Alexandru Marasteanu.
// Version '3.1.1'
// Version '3.2.0'

@@ -191,3 +210,3 @@ 'use strict';

s.VERSION = '3.1.1';
s.VERSION = '3.2.0';

@@ -253,2 +272,3 @@ s.isBlank = _dereq_('./isBlank');

s.escapeRegExp = _dereq_('./helper/escapeRegExp');
s.wrap = _dereq_('./wrap');

@@ -315,3 +335,3 @@ // Aliases

},{"./camelize":1,"./capitalize":2,"./chars":3,"./chop":4,"./classify":5,"./clean":6,"./count":7,"./dasherize":8,"./decapitalize":9,"./dedent":10,"./endsWith":11,"./escapeHTML":12,"./exports":13,"./helper/escapeRegExp":18,"./humanize":23,"./include":24,"./insert":25,"./isBlank":26,"./join":27,"./levenshtein":28,"./lines":29,"./lpad":30,"./lrpad":31,"./ltrim":32,"./naturalCmp":33,"./numberFormat":34,"./pad":35,"./pred":36,"./prune":37,"./quote":38,"./repeat":39,"./replaceAll":40,"./reverse":41,"./rpad":42,"./rtrim":43,"./slugify":44,"./splice":45,"./sprintf":46,"./startsWith":47,"./strLeft":48,"./strLeftBack":49,"./strRight":50,"./strRightBack":51,"./stripTags":52,"./succ":53,"./surround":54,"./swapCase":55,"./titleize":56,"./toBoolean":57,"./toNumber":58,"./toSentence":59,"./toSentenceSerial":60,"./trim":61,"./truncate":62,"./underscored":63,"./unescapeHTML":64,"./unquote":65,"./vsprintf":66,"./words":67}],15:[function(_dereq_,module,exports){
},{"./camelize":1,"./capitalize":2,"./chars":3,"./chop":4,"./classify":5,"./clean":6,"./count":8,"./dasherize":9,"./decapitalize":10,"./dedent":11,"./endsWith":12,"./escapeHTML":13,"./exports":14,"./helper/escapeRegExp":19,"./humanize":24,"./include":25,"./insert":26,"./isBlank":27,"./join":28,"./levenshtein":29,"./lines":30,"./lpad":31,"./lrpad":32,"./ltrim":33,"./naturalCmp":34,"./numberFormat":35,"./pad":36,"./pred":37,"./prune":38,"./quote":39,"./repeat":40,"./replaceAll":41,"./reverse":42,"./rpad":43,"./rtrim":44,"./slugify":45,"./splice":46,"./sprintf":47,"./startsWith":48,"./strLeft":49,"./strLeftBack":50,"./strRight":51,"./strRightBack":52,"./stripTags":53,"./succ":54,"./surround":55,"./swapCase":56,"./titleize":57,"./toBoolean":58,"./toNumber":59,"./toSentence":60,"./toSentenceSerial":61,"./trim":62,"./truncate":63,"./underscored":64,"./unescapeHTML":65,"./unquote":66,"./vsprintf":67,"./words":68,"./wrap":69}],16:[function(_dereq_,module,exports){
var makeString = _dereq_('./makeString');

@@ -327,3 +347,3 @@

},{"./makeString":20}],16:[function(_dereq_,module,exports){
},{"./makeString":21}],17:[function(_dereq_,module,exports){
var escapeRegExp = _dereq_('./escapeRegExp');

@@ -340,3 +360,3 @@

},{"./escapeRegExp":18}],17:[function(_dereq_,module,exports){
},{"./escapeRegExp":19}],18:[function(_dereq_,module,exports){
/* We're explicitly defining the list of entities we want to escape.

@@ -362,3 +382,3 @@ nbsp is an HTML entity, but we don't want to escape all space characters in a string, hence its omission in this map.

},{}],18:[function(_dereq_,module,exports){
},{}],19:[function(_dereq_,module,exports){
var makeString = _dereq_('./makeString');

@@ -370,3 +390,3 @@

},{"./makeString":20}],19:[function(_dereq_,module,exports){
},{"./makeString":21}],20:[function(_dereq_,module,exports){
/*

@@ -392,3 +412,3 @@ We're explicitly defining the list of entities that might see in escape HTML strings

},{}],20:[function(_dereq_,module,exports){
},{}],21:[function(_dereq_,module,exports){
/**

@@ -402,3 +422,3 @@ * Ensure some object is a coerced to a string

},{}],21:[function(_dereq_,module,exports){
},{}],22:[function(_dereq_,module,exports){
module.exports = function strRepeat(str, qty){

@@ -414,3 +434,3 @@ if (qty < 1) return '';

},{}],22:[function(_dereq_,module,exports){
},{}],23:[function(_dereq_,module,exports){
module.exports = function toPositive(number) {

@@ -420,3 +440,3 @@ return number < 0 ? 0 : (+number || 0);

},{}],23:[function(_dereq_,module,exports){
},{}],24:[function(_dereq_,module,exports){
var capitalize = _dereq_('./capitalize');

@@ -430,3 +450,3 @@ var underscored = _dereq_('./underscored');

},{"./capitalize":2,"./trim":61,"./underscored":63}],24:[function(_dereq_,module,exports){
},{"./capitalize":2,"./trim":62,"./underscored":64}],25:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -439,3 +459,3 @@

},{"./helper/makeString":20}],25:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],26:[function(_dereq_,module,exports){
var splice = _dereq_('./splice');

@@ -447,3 +467,3 @@

},{"./splice":45}],26:[function(_dereq_,module,exports){
},{"./splice":46}],27:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -455,3 +475,3 @@

},{"./helper/makeString":20}],27:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],28:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -467,3 +487,3 @@ var slice = [].slice;

},{"./helper/makeString":20}],28:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],29:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -522,9 +542,9 @@

},{"./helper/makeString":20}],29:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],30:[function(_dereq_,module,exports){
module.exports = function lines(str) {
if (str == null) return [];
return String(str).split(/\r?\n/);
return String(str).split(/\r\n?|\n/);
};
},{}],30:[function(_dereq_,module,exports){
},{}],31:[function(_dereq_,module,exports){
var pad = _dereq_('./pad');

@@ -536,3 +556,3 @@

},{"./pad":35}],31:[function(_dereq_,module,exports){
},{"./pad":36}],32:[function(_dereq_,module,exports){
var pad = _dereq_('./pad');

@@ -544,3 +564,3 @@

},{"./pad":35}],32:[function(_dereq_,module,exports){
},{"./pad":36}],33:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -557,3 +577,3 @@ var defaultToWhiteSpace = _dereq_('./helper/defaultToWhiteSpace');

},{"./helper/defaultToWhiteSpace":16,"./helper/makeString":20}],33:[function(_dereq_,module,exports){
},{"./helper/defaultToWhiteSpace":17,"./helper/makeString":21}],34:[function(_dereq_,module,exports){
module.exports = function naturalCmp(str1, str2) {

@@ -589,3 +609,3 @@ if (str1 == str2) return 0;

},{}],34:[function(_dereq_,module,exports){
},{}],35:[function(_dereq_,module,exports){
module.exports = function numberFormat(number, dec, dsep, tsep) {

@@ -604,3 +624,3 @@ if (isNaN(number) || number == null) return '';

},{}],35:[function(_dereq_,module,exports){
},{}],36:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -633,3 +653,3 @@ var strRepeat = _dereq_('./helper/strRepeat');

},{"./helper/makeString":20,"./helper/strRepeat":21}],36:[function(_dereq_,module,exports){
},{"./helper/makeString":21,"./helper/strRepeat":22}],37:[function(_dereq_,module,exports){
var adjacent = _dereq_('./helper/adjacent');

@@ -641,3 +661,3 @@

},{"./helper/adjacent":15}],37:[function(_dereq_,module,exports){
},{"./helper/adjacent":16}],38:[function(_dereq_,module,exports){
/**

@@ -671,3 +691,3 @@ * _s.prune: a more elegant version of truncate

},{"./helper/makeString":20,"./rtrim":43}],38:[function(_dereq_,module,exports){
},{"./helper/makeString":21,"./rtrim":44}],39:[function(_dereq_,module,exports){
var surround = _dereq_('./surround');

@@ -679,3 +699,3 @@

},{"./surround":54}],39:[function(_dereq_,module,exports){
},{"./surround":55}],40:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -697,3 +717,3 @@ var strRepeat = _dereq_('./helper/strRepeat');

},{"./helper/makeString":20,"./helper/strRepeat":21}],40:[function(_dereq_,module,exports){
},{"./helper/makeString":21,"./helper/strRepeat":22}],41:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -708,3 +728,3 @@

},{"./helper/makeString":20}],41:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],42:[function(_dereq_,module,exports){
var chars = _dereq_('./chars');

@@ -716,3 +736,3 @@

},{"./chars":3}],42:[function(_dereq_,module,exports){
},{"./chars":3}],43:[function(_dereq_,module,exports){
var pad = _dereq_('./pad');

@@ -724,3 +744,3 @@

},{"./pad":35}],43:[function(_dereq_,module,exports){
},{"./pad":36}],44:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -737,3 +757,3 @@ var defaultToWhiteSpace = _dereq_('./helper/defaultToWhiteSpace');

},{"./helper/defaultToWhiteSpace":16,"./helper/makeString":20}],44:[function(_dereq_,module,exports){
},{"./helper/defaultToWhiteSpace":17,"./helper/makeString":21}],45:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -743,17 +763,9 @@ var defaultToWhiteSpace = _dereq_('./helper/defaultToWhiteSpace');

var dasherize = _dereq_('./dasherize');
var cleanDiacritics = _dereq_("./cleanDiacritics");
module.exports = function slugify(str) {
var from = "ąàáäâãåæăćčĉęèéëêĝĥìíïîĵłľńňòóöőôõðøśșšŝťțŭùúüűûñÿýçżźž",
to = "aaaaaaaaaccceeeeeghiiiijllnnoooooooossssttuuuuuunyyczzz",
regex = new RegExp(defaultToWhiteSpace(from), 'g');
str = makeString(str).toLowerCase().replace(regex, function(c){
var index = from.indexOf(c);
return to.charAt(index) || '-';
});
return trim(dasherize(str.replace(/[^\w\s-]/g, '-')), '-');
return trim(dasherize(cleanDiacritics(str).replace(/[^\w\s-]/g, '-')), '-');
};
},{"./dasherize":8,"./helper/defaultToWhiteSpace":16,"./helper/makeString":20,"./trim":61}],45:[function(_dereq_,module,exports){
},{"./cleanDiacritics":7,"./dasherize":9,"./helper/defaultToWhiteSpace":17,"./helper/makeString":21,"./trim":62}],46:[function(_dereq_,module,exports){
var chars = _dereq_('./chars');

@@ -767,3 +779,3 @@

},{"./chars":3}],46:[function(_dereq_,module,exports){
},{"./chars":3}],47:[function(_dereq_,module,exports){
// sprintf() for JavaScript 0.7-beta1

@@ -894,3 +906,3 @@ // http://www.diveintojavascript.com/projects/javascript-sprintf

},{"./helper/strRepeat":21}],47:[function(_dereq_,module,exports){
},{"./helper/strRepeat":22}],48:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -906,3 +918,3 @@ var toPositive = _dereq_('./helper/toPositive');

},{"./helper/makeString":20,"./helper/toPositive":22}],48:[function(_dereq_,module,exports){
},{"./helper/makeString":21,"./helper/toPositive":23}],49:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -917,3 +929,3 @@

},{"./helper/makeString":20}],49:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],50:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -928,3 +940,3 @@

},{"./helper/makeString":20}],50:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],51:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -939,3 +951,3 @@

},{"./helper/makeString":20}],51:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],52:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -950,3 +962,3 @@

},{"./helper/makeString":20}],52:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],53:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -958,3 +970,3 @@

},{"./helper/makeString":20}],53:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],54:[function(_dereq_,module,exports){
var adjacent = _dereq_('./helper/adjacent');

@@ -966,3 +978,3 @@

},{"./helper/adjacent":15}],54:[function(_dereq_,module,exports){
},{"./helper/adjacent":16}],55:[function(_dereq_,module,exports){
module.exports = function surround(str, wrapper) {

@@ -972,3 +984,3 @@ return [wrapper, str, wrapper].join('');

},{}],55:[function(_dereq_,module,exports){
},{}],56:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -982,3 +994,3 @@

},{"./helper/makeString":20}],56:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],57:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -992,3 +1004,3 @@

},{"./helper/makeString":20}],57:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],58:[function(_dereq_,module,exports){
var trim = _dereq_('./trim');

@@ -1015,3 +1027,3 @@

},{"./trim":61}],58:[function(_dereq_,module,exports){
},{"./trim":62}],59:[function(_dereq_,module,exports){
var trim = _dereq_('./trim');

@@ -1025,3 +1037,3 @@

},{"./trim":61}],59:[function(_dereq_,module,exports){
},{"./trim":62}],60:[function(_dereq_,module,exports){
var rtrim = _dereq_('./rtrim');

@@ -1040,3 +1052,3 @@

},{"./rtrim":43}],60:[function(_dereq_,module,exports){
},{"./rtrim":44}],61:[function(_dereq_,module,exports){
var toSentence = _dereq_('./toSentence');

@@ -1048,3 +1060,3 @@

},{"./toSentence":59}],61:[function(_dereq_,module,exports){
},{"./toSentence":60}],62:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -1061,3 +1073,3 @@ var defaultToWhiteSpace = _dereq_('./helper/defaultToWhiteSpace');

},{"./helper/defaultToWhiteSpace":16,"./helper/makeString":20}],62:[function(_dereq_,module,exports){
},{"./helper/defaultToWhiteSpace":17,"./helper/makeString":21}],63:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -1072,3 +1084,3 @@

},{"./helper/makeString":20}],63:[function(_dereq_,module,exports){
},{"./helper/makeString":21}],64:[function(_dereq_,module,exports){
var trim = _dereq_('./trim');

@@ -1080,3 +1092,3 @@

},{"./trim":61}],64:[function(_dereq_,module,exports){
},{"./trim":62}],65:[function(_dereq_,module,exports){
var makeString = _dereq_('./helper/makeString');

@@ -1101,3 +1113,3 @@ var htmlEntities = _dereq_('./helper/htmlEntities');

},{"./helper/htmlEntities":19,"./helper/makeString":20}],65:[function(_dereq_,module,exports){
},{"./helper/htmlEntities":20,"./helper/makeString":21}],66:[function(_dereq_,module,exports){
module.exports = function unquote(str, quoteChar) {

@@ -1110,3 +1122,3 @@ quoteChar = quoteChar || '"';

},{}],66:[function(_dereq_,module,exports){
},{}],67:[function(_dereq_,module,exports){
var sprintf = _dereq_('./sprintf');

@@ -1119,3 +1131,3 @@

},{"./sprintf":46}],67:[function(_dereq_,module,exports){
},{"./sprintf":47}],68:[function(_dereq_,module,exports){
var isBlank = _dereq_('./isBlank');

@@ -1129,4 +1141,105 @@ var trim = _dereq_('./trim');

},{"./isBlank":26,"./trim":61}]},{},[14])
(14)
},{"./isBlank":27,"./trim":62}],69:[function(_dereq_,module,exports){
// Wrap
// wraps a string by a certain width
makeString = _dereq_('./helper/makeString');
module.exports = function wrap(str, options){
str = makeString(str);
options = options || {};
width = options.width || 75;
seperator = options.seperator || '\n';
cut = options.cut || false;
preserveSpaces = options.preserveSpaces || false;
trailingSpaces = options.trailingSpaces || false;
if(width <= 0){
return str;
}
else if(!cut){
words = str.split(" ");
result = "";
current_column = 0;
while(words.length > 0){
// if adding a space and the next word would cause this line to be longer than width...
if(1 + words[0].length + current_column > width){
//start a new line if this line is not already empty
if(current_column > 0){
// add a space at the end of the line is preserveSpaces is true
if (preserveSpaces){
result += ' ';
current_column++;
}
// fill the rest of the line with spaces if trailingSpaces option is true
else if(trailingSpaces){
while(current_column < width){
result += ' ';
current_column++;
}
}
//start new line
result += seperator;
current_column = 0;
}
}
// if not at the begining of the line, add a space in front of the word
if(current_column > 0){
result += " ";
current_column++;
}
// tack on the next word, update current column, a pop words array
result += words[0];
current_column += words[0].length;
words.shift();
}
// fill the rest of the line with spaces if trailingSpaces option is true
if(trailingSpaces){
while(current_column < width){
result += ' ';
current_column++;
}
}
return result;
}
else {
index = 0;
result = "";
// walk through each character and add seperators where appropriate
while(index < str.length){
if(index % width == 0 && index > 0){
result += seperator;
}
result += str.charAt(index);
index++;
}
// fill the rest of the line with spaces if trailingSpaces option is true
if(trailingSpaces){
while(index % width > 0){
result += ' ';
index++;
}
}
return result;
}
};
},{"./helper/makeString":21}]},{},[15])
(15)
});

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

!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var r;"undefined"!=typeof window?r=window:"undefined"!=typeof global?r=global:"undefined"!=typeof self&&(r=self),r.s=e()}}(function(){return function e(r,t,n){function i(o,p){if(!t[o]){if(!r[o]){var u="function"==typeof require&&require;if(!p&&u)return u(o,!0);if(a)return a(o,!0);throw new Error("Cannot find module '"+o+"'")}var c=t[o]={exports:{}};r[o][0].call(c.exports,function(e){var t=r[o][1][e];return i(t?t:e)},c,c.exports,e,r,t,n)}return t[o].exports}for(var a="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,r){var t=e("./trim"),n=e("./decapitalize");r.exports=function(e,r){return e=t(e).replace(/[-_\s]+(.)?/g,function(e,r){return r?r.toUpperCase():""}),r===!0?n(e):e}},{"./decapitalize":9,"./trim":61}],2:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r){e=t(e);var n=r?e.slice(1).toLowerCase():e.slice(1);return e.charAt(0).toUpperCase()+n}},{"./helper/makeString":20}],3:[function(e,r){var t=e("./helper/makeString");r.exports=function(e){return t(e).split("")}},{"./helper/makeString":20}],4:[function(e,r){r.exports=function(e,r){return null==e?[]:(e=String(e),r=~~r,r>0?e.match(new RegExp(".{1,"+r+"}","g")):[e])}},{}],5:[function(e,r){var t=e("./capitalize"),n=e("./camelize"),i=e("./helper/makeString");r.exports=function(e){return e=i(e),t(n(e.replace(/[\W_]/g," ")).replace(/\s/g,""))}},{"./camelize":1,"./capitalize":2,"./helper/makeString":20}],6:[function(e,r){var t=e("./trim");r.exports=function(e){return t(e).replace(/\s+/g," ")}},{"./trim":61}],7:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r){return e=t(e),r=t(r),0===e.length||0===r.length?0:e.split(r).length-1}},{"./helper/makeString":20}],8:[function(e,r){var t=e("./trim");r.exports=function(e){return t(e).replace(/([A-Z])/g,"-$1").replace(/[-_\s]+/g,"-").toLowerCase()}},{"./trim":61}],9:[function(e,r){var t=e("./helper/makeString");r.exports=function(e){return e=t(e),e.charAt(0).toLowerCase()+e.slice(1)}},{"./helper/makeString":20}],10:[function(e,r){function t(e){for(var r=e.match(/^[\s\\t]*/gm),t=r[0].length,n=1;n<r.length;n++)t=Math.min(r[n].length,t);return t}var n=e("./helper/makeString");r.exports=function(e,r){e=n(e);var i,a=t(e);return 0===a?e:(i="string"==typeof r?new RegExp("^"+r,"gm"):new RegExp("^[ \\t]{"+a+"}","gm"),e.replace(i,""))}},{"./helper/makeString":20}],11:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/toPositive");r.exports=function(e,r,i){return e=t(e),r=""+r,i="undefined"==typeof i?e.length-r.length:Math.min(n(i),e.length)-r.length,i>=0&&e.indexOf(r,i)===i}},{"./helper/makeString":20,"./helper/toPositive":22}],12:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/escapeChars"),i="[";for(var a in n)i+=a;i+="]";var o=new RegExp(i,"g");r.exports=function(e){return t(e).replace(o,function(e){return"&"+n[e]+";"})}},{"./helper/escapeChars":17,"./helper/makeString":20}],13:[function(e,r){r.exports=function(){var e={};for(var r in this)this.hasOwnProperty(r)&&!r.match(/^(?:include|contains|reverse|join)$/)&&(e[r]=this[r]);return e}},{}],14:[function(e,r){"use strict";function t(e){return this instanceof t?void(this._wrapped=e):new t(e)}function n(e,r){"function"==typeof r&&(t.prototype[e]=function(){var e=[this._wrapped].concat(Array.prototype.slice.call(arguments)),n=r.apply(null,e);return"string"==typeof n?new t(n):n})}function i(e){n(e,function(r){var t=Array.prototype.slice.call(arguments,1);return String.prototype[e].apply(r,t)})}t.VERSION="3.1.1",t.isBlank=e("./isBlank"),t.stripTags=e("./stripTags"),t.capitalize=e("./capitalize"),t.decapitalize=e("./decapitalize"),t.chop=e("./chop"),t.trim=e("./trim"),t.clean=e("./clean"),t.count=e("./count"),t.chars=e("./chars"),t.swapCase=e("./swapCase"),t.escapeHTML=e("./escapeHTML"),t.unescapeHTML=e("./unescapeHTML"),t.splice=e("./splice"),t.insert=e("./insert"),t.replaceAll=e("./replaceAll"),t.include=e("./include"),t.join=e("./join"),t.lines=e("./lines"),t.dedent=e("./dedent"),t.reverse=e("./reverse"),t.startsWith=e("./startsWith"),t.endsWith=e("./endsWith"),t.pred=e("./pred"),t.succ=e("./succ"),t.titleize=e("./titleize"),t.camelize=e("./camelize"),t.underscored=e("./underscored"),t.dasherize=e("./dasherize"),t.classify=e("./classify"),t.humanize=e("./humanize"),t.ltrim=e("./ltrim"),t.rtrim=e("./rtrim"),t.truncate=e("./truncate"),t.prune=e("./prune"),t.words=e("./words"),t.pad=e("./pad"),t.lpad=e("./lpad"),t.rpad=e("./rpad"),t.lrpad=e("./lrpad"),t.sprintf=e("./sprintf"),t.vsprintf=e("./vsprintf"),t.toNumber=e("./toNumber"),t.numberFormat=e("./numberFormat"),t.strRight=e("./strRight"),t.strRightBack=e("./strRightBack"),t.strLeft=e("./strLeft"),t.strLeftBack=e("./strLeftBack"),t.toSentence=e("./toSentence"),t.toSentenceSerial=e("./toSentenceSerial"),t.slugify=e("./slugify"),t.surround=e("./surround"),t.quote=e("./quote"),t.unquote=e("./unquote"),t.repeat=e("./repeat"),t.naturalCmp=e("./naturalCmp"),t.levenshtein=e("./levenshtein"),t.toBoolean=e("./toBoolean"),t.exports=e("./exports"),t.escapeRegExp=e("./helper/escapeRegExp"),t.strip=t.trim,t.lstrip=t.ltrim,t.rstrip=t.rtrim,t.center=t.lrpad,t.rjust=t.lpad,t.ljust=t.rpad,t.contains=t.include,t.q=t.quote,t.toBool=t.toBoolean,t.camelcase=t.camelize,t.prototype={value:function(){return this._wrapped}};for(var a in t)n(a,t[a]);n("tap",function(e,r){return r(e)});var o=["toUpperCase","toLowerCase","split","replace","slice","substring","substr","concat"];for(var a in o)i(o[a]);r.exports=t},{"./camelize":1,"./capitalize":2,"./chars":3,"./chop":4,"./classify":5,"./clean":6,"./count":7,"./dasherize":8,"./decapitalize":9,"./dedent":10,"./endsWith":11,"./escapeHTML":12,"./exports":13,"./helper/escapeRegExp":18,"./humanize":23,"./include":24,"./insert":25,"./isBlank":26,"./join":27,"./levenshtein":28,"./lines":29,"./lpad":30,"./lrpad":31,"./ltrim":32,"./naturalCmp":33,"./numberFormat":34,"./pad":35,"./pred":36,"./prune":37,"./quote":38,"./repeat":39,"./replaceAll":40,"./reverse":41,"./rpad":42,"./rtrim":43,"./slugify":44,"./splice":45,"./sprintf":46,"./startsWith":47,"./strLeft":48,"./strLeftBack":49,"./strRight":50,"./strRightBack":51,"./stripTags":52,"./succ":53,"./surround":54,"./swapCase":55,"./titleize":56,"./toBoolean":57,"./toNumber":58,"./toSentence":59,"./toSentenceSerial":60,"./trim":61,"./truncate":62,"./underscored":63,"./unescapeHTML":64,"./unquote":65,"./vsprintf":66,"./words":67}],15:[function(e,r){var t=e("./makeString");r.exports=function(e,r){return e=t(e),0===e.length?"":e.slice(0,-1)+String.fromCharCode(e.charCodeAt(e.length-1)+r)}},{"./makeString":20}],16:[function(e,r){var t=e("./escapeRegExp");r.exports=function(e){return null==e?"\\s":e.source?e.source:"["+t(e)+"]"}},{"./escapeRegExp":18}],17:[function(e,r){var t={"¢":"cent","£":"pound","¥":"yen","€":"euro","©":"copy","®":"reg","<":"lt",">":"gt",'"':"quot","&":"amp","'":"#39"};r.exports=t},{}],18:[function(e,r){var t=e("./makeString");r.exports=function(e){return t(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}},{"./makeString":20}],19:[function(e,r){var t={nbsp:" ",cent:"¢",pound:"£",yen:"¥",euro:"€",copy:"©",reg:"®",lt:"<",gt:">",quot:'"',amp:"&",apos:"'"};r.exports=t},{}],20:[function(e,r){r.exports=function(e){return null==e?"":""+e}},{}],21:[function(e,r){r.exports=function(e,r){if(1>r)return"";for(var t="";r>0;)1&r&&(t+=e),r>>=1,e+=e;return t}},{}],22:[function(e,r){r.exports=function(e){return 0>e?0:+e||0}},{}],23:[function(e,r){var t=e("./capitalize"),n=e("./underscored"),i=e("./trim");r.exports=function(e){return t(i(n(e).replace(/_id$/,"").replace(/_/g," ")))}},{"./capitalize":2,"./trim":61,"./underscored":63}],24:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r){return""===r?!0:-1!==t(e).indexOf(r)}},{"./helper/makeString":20}],25:[function(e,r){var t=e("./splice");r.exports=function(e,r,n){return t(e,r,0,n)}},{"./splice":45}],26:[function(e,r){var t=e("./helper/makeString");r.exports=function(e){return/^\s*$/.test(t(e))}},{"./helper/makeString":20}],27:[function(e,r){var t=e("./helper/makeString"),n=[].slice;r.exports=function(){var e=n.call(arguments),r=e.shift();return e.join(t(r))}},{"./helper/makeString":20}],28:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r){"use strict";if(e=t(e),r=t(r),e===r)return 0;if(!e||!r)return Math.max(e.length,r.length);for(var n=new Array(r.length+1),i=0;i<n.length;++i)n[i]=i;for(i=0;i<e.length;++i){for(var a=i+1,o=0;o<r.length;++o){var p=a;a=n[o]+(e.charAt(i)===r.charAt(o)?0:1);var u=p+1;a>u&&(a=u),u=n[o+1]+1,a>u&&(a=u),n[o]=p}n[o]=a}return a}},{"./helper/makeString":20}],29:[function(e,r){r.exports=function(e){return null==e?[]:String(e).split(/\r?\n/)}},{}],30:[function(e,r){var t=e("./pad");r.exports=function(e,r,n){return t(e,r,n)}},{"./pad":35}],31:[function(e,r){var t=e("./pad");r.exports=function(e,r,n){return t(e,r,n,"both")}},{"./pad":35}],32:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/defaultToWhiteSpace"),i=String.prototype.trimLeft;r.exports=function(e,r){return e=t(e),!r&&i?i.call(e):(r=n(r),e.replace(new RegExp("^"+r+"+"),""))}},{"./helper/defaultToWhiteSpace":16,"./helper/makeString":20}],33:[function(e,r){r.exports=function(e,r){if(e==r)return 0;if(!e)return-1;if(!r)return 1;for(var t=/(\.\d+|\d+|\D+)/g,n=String(e).match(t),i=String(r).match(t),a=Math.min(n.length,i.length),o=0;a>o;o++){var p=n[o],u=i[o];if(p!==u){var c=+p,s=+u;return c===c&&s===s?c>s?1:-1:u>p?-1:1}}return n.length!=i.length?n.length-i.length:r>e?-1:1}},{}],34:[function(e,r){r.exports=function(e,r,t,n){if(isNaN(e)||null==e)return"";e=e.toFixed(~~r),n="string"==typeof n?n:",";var i=e.split("."),a=i[0],o=i[1]?(t||".")+i[1]:"";return a.replace(/(\d)(?=(?:\d{3})+$)/g,"$1"+n)+o}},{}],35:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/strRepeat");r.exports=function(e,r,i,a){e=t(e),r=~~r;var o=0;switch(i?i.length>1&&(i=i.charAt(0)):i=" ",a){case"right":return o=r-e.length,e+n(i,o);case"both":return o=r-e.length,n(i,Math.ceil(o/2))+e+n(i,Math.floor(o/2));default:return o=r-e.length,n(i,o)+e}}},{"./helper/makeString":20,"./helper/strRepeat":21}],36:[function(e,r){var t=e("./helper/adjacent");r.exports=function(e){return t(e,-1)}},{"./helper/adjacent":15}],37:[function(e,r){var t=e("./helper/makeString"),n=e("./rtrim");r.exports=function(e,r,i){if(e=t(e),r=~~r,i=null!=i?String(i):"...",e.length<=r)return e;var a=function(e){return e.toUpperCase()!==e.toLowerCase()?"A":" "},o=e.slice(0,r+1).replace(/.(?=\W*\w*$)/g,a);return o=o.slice(o.length-2).match(/\w\w/)?o.replace(/\s*\S+$/,""):n(o.slice(0,o.length-1)),(o+i).length>e.length?e:e.slice(0,o.length)+i}},{"./helper/makeString":20,"./rtrim":43}],38:[function(e,r){var t=e("./surround");r.exports=function(e,r){return t(e,r||'"')}},{"./surround":54}],39:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/strRepeat");r.exports=function i(e,r,a){if(e=t(e),r=~~r,null==a)return n(e,r);for(var i=[];r>0;i[--r]=e);return i.join(a)}},{"./helper/makeString":20,"./helper/strRepeat":21}],40:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r,n,i){var a=i===!0?"gi":"g",o=new RegExp(r,a);return t(e).replace(o,n)}},{"./helper/makeString":20}],41:[function(e,r){var t=e("./chars");r.exports=function(e){return t(e).reverse().join("")}},{"./chars":3}],42:[function(e,r){var t=e("./pad");r.exports=function(e,r,n){return t(e,r,n,"right")}},{"./pad":35}],43:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/defaultToWhiteSpace"),i=String.prototype.trimRight;r.exports=function(e,r){return e=t(e),!r&&i?i.call(e):(r=n(r),e.replace(new RegExp(r+"+$"),""))}},{"./helper/defaultToWhiteSpace":16,"./helper/makeString":20}],44:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/defaultToWhiteSpace"),i=e("./trim"),a=e("./dasherize");r.exports=function(e){var r="ąàáäâãåæăćčĉęèéëêĝĥìíïîĵłľńňòóöőôõðøśșšŝťțŭùúüűûñÿýçżźž",o="aaaaaaaaaccceeeeeghiiiijllnnoooooooossssttuuuuuunyyczzz",p=new RegExp(n(r),"g");return e=t(e).toLowerCase().replace(p,function(e){var t=r.indexOf(e);return o.charAt(t)||"-"}),i(a(e.replace(/[^\w\s-]/g,"-")),"-")}},{"./dasherize":8,"./helper/defaultToWhiteSpace":16,"./helper/makeString":20,"./trim":61}],45:[function(e,r){var t=e("./chars");r.exports=function(e,r,n,i){var a=t(e);return a.splice(~~r,~~n,i),a.join("")}},{"./chars":3}],46:[function(e,r){var t=e("./helper/strRepeat"),n=Object.prototype.toString,i=function(){function e(e){return n.call(e).slice(8,-1).toLowerCase()}var r=t,a=function(){return a.cache.hasOwnProperty(arguments[0])||(a.cache[arguments[0]]=a.parse(arguments[0])),a.format.call(null,a.cache[arguments[0]],arguments)};return a.format=function(t,n){var a,o,p,u,c,s,l,f=1,h=t.length,g="",m=[];for(o=0;h>o;o++)if(g=e(t[o]),"string"===g)m.push(t[o]);else if("array"===g){if(u=t[o],u[2])for(a=n[f],p=0;p<u[2].length;p++){if(!a.hasOwnProperty(u[2][p]))throw new Error(i('[_.sprintf] property "%s" does not exist',u[2][p]));a=a[u[2][p]]}else a=u[1]?n[u[1]]:n[f++];if(/[^s]/.test(u[8])&&"number"!=e(a))throw new Error(i("[_.sprintf] expecting number but found %s",e(a)));switch(u[8]){case"b":a=a.toString(2);break;case"c":a=String.fromCharCode(a);break;case"d":a=parseInt(a,10);break;case"e":a=u[7]?a.toExponential(u[7]):a.toExponential();break;case"f":a=u[7]?parseFloat(a).toFixed(u[7]):parseFloat(a);break;case"o":a=a.toString(8);break;case"s":a=(a=String(a))&&u[7]?a.substring(0,u[7]):a;break;case"u":a=Math.abs(a);break;case"x":a=a.toString(16);break;case"X":a=a.toString(16).toUpperCase()}a=/[def]/.test(u[8])&&u[3]&&a>=0?"+"+a:a,s=u[4]?"0"==u[4]?"0":u[4].charAt(1):" ",l=u[6]-String(a).length,c=u[6]?r(s,l):"",m.push(u[5]?a+c:c+a)}return m.join("")},a.cache={},a.parse=function(e){for(var r=e,t=[],n=[],i=0;r;){if(null!==(t=/^[^\x25]+/.exec(r)))n.push(t[0]);else if(null!==(t=/^\x25{2}/.exec(r)))n.push("%");else{if(null===(t=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(r)))throw new Error("[_.sprintf] huh?");if(t[2]){i|=1;var a=[],o=t[2],p=[];if(null===(p=/^([a-z_][a-z_\d]*)/i.exec(o)))throw new Error("[_.sprintf] huh?");for(a.push(p[1]);""!==(o=o.substring(p[0].length));)if(null!==(p=/^\.([a-z_][a-z_\d]*)/i.exec(o)))a.push(p[1]);else{if(null===(p=/^\[(\d+)\]/.exec(o)))throw new Error("[_.sprintf] huh?");a.push(p[1])}t[2]=a}else i|=2;if(3===i)throw new Error("[_.sprintf] mixing positional and named placeholders is not (yet) supported");n.push(t)}r=r.substring(t[0].length)}return n},a}();r.exports=i},{"./helper/strRepeat":21}],47:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/toPositive");r.exports=function(e,r,i){return e=t(e),r=""+r,i=null==i?0:Math.min(n(i),e.length),e.lastIndexOf(r,i)===i}},{"./helper/makeString":20,"./helper/toPositive":22}],48:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r){e=t(e),r=t(r);var n=r?e.indexOf(r):-1;return~n?e.slice(0,n):e}},{"./helper/makeString":20}],49:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r){e=t(e),r=t(r);var n=e.lastIndexOf(r);return~n?e.slice(0,n):e}},{"./helper/makeString":20}],50:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r){e=t(e),r=t(r);var n=r?e.indexOf(r):-1;return~n?e.slice(n+r.length,e.length):e}},{"./helper/makeString":20}],51:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r){e=t(e),r=t(r);var n=r?e.lastIndexOf(r):-1;return~n?e.slice(n+r.length,e.length):e}},{"./helper/makeString":20}],52:[function(e,r){var t=e("./helper/makeString");r.exports=function(e){return t(e).replace(/<\/?[^>]+>/g,"")}},{"./helper/makeString":20}],53:[function(e,r){var t=e("./helper/adjacent");r.exports=function(e){return t(e,1)}},{"./helper/adjacent":15}],54:[function(e,r){r.exports=function(e,r){return[r,e,r].join("")}},{}],55:[function(e,r){var t=e("./helper/makeString");r.exports=function(e){return t(e).replace(/\S/g,function(e){return e===e.toUpperCase()?e.toLowerCase():e.toUpperCase()})}},{"./helper/makeString":20}],56:[function(e,r){var t=e("./helper/makeString");r.exports=function(e){return t(e).toLowerCase().replace(/(?:^|\s|-)\S/g,function(e){return e.toUpperCase()})}},{"./helper/makeString":20}],57:[function(e,r){function t(e,r){var t,n,i=e.toLowerCase();for(r=[].concat(r),t=0;t<r.length;t+=1)if(n=r[t]){if(n.test&&n.test(e))return!0;if(n.toLowerCase()===i)return!0}}var n=e("./trim");r.exports=function(e,r,i){return"number"==typeof e&&(e=""+e),"string"!=typeof e?!!e:(e=n(e),t(e,r||["true","1"])?!0:t(e,i||["false","0"])?!1:void 0)}},{"./trim":61}],58:[function(e,r){e("./trim");r.exports=function(e,r){if(null==e)return 0;var t=Math.pow(10,isFinite(r)?r:0);return Math.round(e*t)/t}},{"./trim":61}],59:[function(e,r){var t=e("./rtrim");r.exports=function(e,r,n,i){r=r||", ",n=n||" and ";var a=e.slice(),o=a.pop();return e.length>2&&i&&(n=t(r)+n),a.length?a.join(r)+n+o:o}},{"./rtrim":43}],60:[function(e,r){var t=e("./toSentence");r.exports=function(e,r,n){return t(e,r,n,!0)}},{"./toSentence":59}],61:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/defaultToWhiteSpace"),i=String.prototype.trim;r.exports=function(e,r){return e=t(e),!r&&i?i.call(e):(r=n(r),e.replace(new RegExp("^"+r+"+|"+r+"+$","g"),""))}},{"./helper/defaultToWhiteSpace":16,"./helper/makeString":20}],62:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r,n){return e=t(e),n=n||"...",r=~~r,e.length>r?e.slice(0,r)+n:e}},{"./helper/makeString":20}],63:[function(e,r){var t=e("./trim");r.exports=function(e){return t(e).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()}},{"./trim":61}],64:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/htmlEntities");r.exports=function(e){return t(e).replace(/\&([^;]+);/g,function(e,r){var t;return r in n?n[r]:(t=r.match(/^#x([\da-fA-F]+)$/))?String.fromCharCode(parseInt(t[1],16)):(t=r.match(/^#(\d+)$/))?String.fromCharCode(~~t[1]):e})}},{"./helper/htmlEntities":19,"./helper/makeString":20}],65:[function(e,r){r.exports=function(e,r){return r=r||'"',e[0]===r&&e[e.length-1]===r?e.slice(1,e.length-1):e}},{}],66:[function(e,r){var t=e("./sprintf");r.exports=function(e,r){return r.unshift(e),t.apply(null,r)}},{"./sprintf":46}],67:[function(e,r){var t=e("./isBlank"),n=e("./trim");r.exports=function(e,r){return t(e)?[]:n(e,r).split(r||/\s+/)}},{"./isBlank":26,"./trim":61}]},{},[14])(14)});
/* underscore.string 3.2.0 | MIT licensed | http://epeli.github.com/underscore.string/ */
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var r;"undefined"!=typeof window?r=window:"undefined"!=typeof global?r=global:"undefined"!=typeof self&&(r=self),r.s=e()}}(function(){return function e(r,t,n){function i(o,u){if(!t[o]){if(!r[o]){var p="function"==typeof require&&require;if(!u&&p)return p(o,!0);if(a)return a(o,!0);throw new Error("Cannot find module '"+o+"'")}var c=t[o]={exports:{}};r[o][0].call(c.exports,function(e){var t=r[o][1][e];return i(t?t:e)},c,c.exports,e,r,t,n)}return t[o].exports}for(var a="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,r){var t=e("./trim"),n=e("./decapitalize");r.exports=function(e,r){return e=t(e).replace(/[-_\s]+(.)?/g,function(e,r){return r?r.toUpperCase():""}),r===!0?n(e):e}},{"./decapitalize":10,"./trim":62}],2:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r){e=t(e);var n=r?e.slice(1).toLowerCase():e.slice(1);return e.charAt(0).toUpperCase()+n}},{"./helper/makeString":21}],3:[function(e,r){var t=e("./helper/makeString");r.exports=function(e){return t(e).split("")}},{"./helper/makeString":21}],4:[function(e,r){r.exports=function(e,r){return null==e?[]:(e=String(e),r=~~r,r>0?e.match(new RegExp(".{1,"+r+"}","g")):[e])}},{}],5:[function(e,r){var t=e("./capitalize"),n=e("./camelize"),i=e("./helper/makeString");r.exports=function(e){return e=i(e),t(n(e.replace(/[\W_]/g," ")).replace(/\s/g,""))}},{"./camelize":1,"./capitalize":2,"./helper/makeString":21}],6:[function(e,r){var t=e("./trim");r.exports=function(e){return t(e).replace(/\s\s+/g," ")}},{"./trim":62}],7:[function(e,r){var t=e("./helper/makeString"),n="ąàáäâãåæăćčĉęèéëêĝĥìíïîĵłľńňòóöőôõðøśșšŝťțŭùúüűûñÿýçżźž",i="aaaaaaaaaccceeeeeghiiiijllnnoooooooossssttuuuuuunyyczzz";n+=n.toUpperCase(),i+=i.toUpperCase(),r.exports=function(e){return t(e).replace(/.{1}/g,function(e){var r=n.indexOf(e);return-1===r?e:i.charAt(r)})}},{"./helper/makeString":21}],8:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r){return e=t(e),r=t(r),0===e.length||0===r.length?0:e.split(r).length-1}},{"./helper/makeString":21}],9:[function(e,r){var t=e("./trim");r.exports=function(e){return t(e).replace(/([A-Z])/g,"-$1").replace(/[-_\s]+/g,"-").toLowerCase()}},{"./trim":62}],10:[function(e,r){var t=e("./helper/makeString");r.exports=function(e){return e=t(e),e.charAt(0).toLowerCase()+e.slice(1)}},{"./helper/makeString":21}],11:[function(e,r){function t(e){for(var r=e.match(/^[\s\\t]*/gm),t=r[0].length,n=1;n<r.length;n++)t=Math.min(r[n].length,t);return t}var n=e("./helper/makeString");r.exports=function(e,r){e=n(e);var i,a=t(e);return 0===a?e:(i="string"==typeof r?new RegExp("^"+r,"gm"):new RegExp("^[ \\t]{"+a+"}","gm"),e.replace(i,""))}},{"./helper/makeString":21}],12:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/toPositive");r.exports=function(e,r,i){return e=t(e),r=""+r,i="undefined"==typeof i?e.length-r.length:Math.min(n(i),e.length)-r.length,i>=0&&e.indexOf(r,i)===i}},{"./helper/makeString":21,"./helper/toPositive":23}],13:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/escapeChars"),i="[";for(var a in n)i+=a;i+="]";var o=new RegExp(i,"g");r.exports=function(e){return t(e).replace(o,function(e){return"&"+n[e]+";"})}},{"./helper/escapeChars":18,"./helper/makeString":21}],14:[function(e,r){r.exports=function(){var e={};for(var r in this)this.hasOwnProperty(r)&&!r.match(/^(?:include|contains|reverse|join)$/)&&(e[r]=this[r]);return e}},{}],15:[function(e,r){"use strict";function t(e){return this instanceof t?void(this._wrapped=e):new t(e)}function n(e,r){"function"==typeof r&&(t.prototype[e]=function(){var e=[this._wrapped].concat(Array.prototype.slice.call(arguments)),n=r.apply(null,e);return"string"==typeof n?new t(n):n})}function i(e){n(e,function(r){var t=Array.prototype.slice.call(arguments,1);return String.prototype[e].apply(r,t)})}t.VERSION="3.2.0",t.isBlank=e("./isBlank"),t.stripTags=e("./stripTags"),t.capitalize=e("./capitalize"),t.decapitalize=e("./decapitalize"),t.chop=e("./chop"),t.trim=e("./trim"),t.clean=e("./clean"),t.count=e("./count"),t.chars=e("./chars"),t.swapCase=e("./swapCase"),t.escapeHTML=e("./escapeHTML"),t.unescapeHTML=e("./unescapeHTML"),t.splice=e("./splice"),t.insert=e("./insert"),t.replaceAll=e("./replaceAll"),t.include=e("./include"),t.join=e("./join"),t.lines=e("./lines"),t.dedent=e("./dedent"),t.reverse=e("./reverse"),t.startsWith=e("./startsWith"),t.endsWith=e("./endsWith"),t.pred=e("./pred"),t.succ=e("./succ"),t.titleize=e("./titleize"),t.camelize=e("./camelize"),t.underscored=e("./underscored"),t.dasherize=e("./dasherize"),t.classify=e("./classify"),t.humanize=e("./humanize"),t.ltrim=e("./ltrim"),t.rtrim=e("./rtrim"),t.truncate=e("./truncate"),t.prune=e("./prune"),t.words=e("./words"),t.pad=e("./pad"),t.lpad=e("./lpad"),t.rpad=e("./rpad"),t.lrpad=e("./lrpad"),t.sprintf=e("./sprintf"),t.vsprintf=e("./vsprintf"),t.toNumber=e("./toNumber"),t.numberFormat=e("./numberFormat"),t.strRight=e("./strRight"),t.strRightBack=e("./strRightBack"),t.strLeft=e("./strLeft"),t.strLeftBack=e("./strLeftBack"),t.toSentence=e("./toSentence"),t.toSentenceSerial=e("./toSentenceSerial"),t.slugify=e("./slugify"),t.surround=e("./surround"),t.quote=e("./quote"),t.unquote=e("./unquote"),t.repeat=e("./repeat"),t.naturalCmp=e("./naturalCmp"),t.levenshtein=e("./levenshtein"),t.toBoolean=e("./toBoolean"),t.exports=e("./exports"),t.escapeRegExp=e("./helper/escapeRegExp"),t.wrap=e("./wrap"),t.strip=t.trim,t.lstrip=t.ltrim,t.rstrip=t.rtrim,t.center=t.lrpad,t.rjust=t.lpad,t.ljust=t.rpad,t.contains=t.include,t.q=t.quote,t.toBool=t.toBoolean,t.camelcase=t.camelize,t.prototype={value:function(){return this._wrapped}};for(var a in t)n(a,t[a]);n("tap",function(e,r){return r(e)});var o=["toUpperCase","toLowerCase","split","replace","slice","substring","substr","concat"];for(var a in o)i(o[a]);r.exports=t},{"./camelize":1,"./capitalize":2,"./chars":3,"./chop":4,"./classify":5,"./clean":6,"./count":8,"./dasherize":9,"./decapitalize":10,"./dedent":11,"./endsWith":12,"./escapeHTML":13,"./exports":14,"./helper/escapeRegExp":19,"./humanize":24,"./include":25,"./insert":26,"./isBlank":27,"./join":28,"./levenshtein":29,"./lines":30,"./lpad":31,"./lrpad":32,"./ltrim":33,"./naturalCmp":34,"./numberFormat":35,"./pad":36,"./pred":37,"./prune":38,"./quote":39,"./repeat":40,"./replaceAll":41,"./reverse":42,"./rpad":43,"./rtrim":44,"./slugify":45,"./splice":46,"./sprintf":47,"./startsWith":48,"./strLeft":49,"./strLeftBack":50,"./strRight":51,"./strRightBack":52,"./stripTags":53,"./succ":54,"./surround":55,"./swapCase":56,"./titleize":57,"./toBoolean":58,"./toNumber":59,"./toSentence":60,"./toSentenceSerial":61,"./trim":62,"./truncate":63,"./underscored":64,"./unescapeHTML":65,"./unquote":66,"./vsprintf":67,"./words":68,"./wrap":69}],16:[function(e,r){var t=e("./makeString");r.exports=function(e,r){return e=t(e),0===e.length?"":e.slice(0,-1)+String.fromCharCode(e.charCodeAt(e.length-1)+r)}},{"./makeString":21}],17:[function(e,r){var t=e("./escapeRegExp");r.exports=function(e){return null==e?"\\s":e.source?e.source:"["+t(e)+"]"}},{"./escapeRegExp":19}],18:[function(e,r){var t={"¢":"cent","£":"pound","¥":"yen","€":"euro","©":"copy","®":"reg","<":"lt",">":"gt",'"':"quot","&":"amp","'":"#39"};r.exports=t},{}],19:[function(e,r){var t=e("./makeString");r.exports=function(e){return t(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}},{"./makeString":21}],20:[function(e,r){var t={nbsp:" ",cent:"¢",pound:"£",yen:"¥",euro:"€",copy:"©",reg:"®",lt:"<",gt:">",quot:'"',amp:"&",apos:"'"};r.exports=t},{}],21:[function(e,r){r.exports=function(e){return null==e?"":""+e}},{}],22:[function(e,r){r.exports=function(e,r){if(1>r)return"";for(var t="";r>0;)1&r&&(t+=e),r>>=1,e+=e;return t}},{}],23:[function(e,r){r.exports=function(e){return 0>e?0:+e||0}},{}],24:[function(e,r){var t=e("./capitalize"),n=e("./underscored"),i=e("./trim");r.exports=function(e){return t(i(n(e).replace(/_id$/,"").replace(/_/g," ")))}},{"./capitalize":2,"./trim":62,"./underscored":64}],25:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r){return""===r?!0:-1!==t(e).indexOf(r)}},{"./helper/makeString":21}],26:[function(e,r){var t=e("./splice");r.exports=function(e,r,n){return t(e,r,0,n)}},{"./splice":46}],27:[function(e,r){var t=e("./helper/makeString");r.exports=function(e){return/^\s*$/.test(t(e))}},{"./helper/makeString":21}],28:[function(e,r){var t=e("./helper/makeString"),n=[].slice;r.exports=function(){var e=n.call(arguments),r=e.shift();return e.join(t(r))}},{"./helper/makeString":21}],29:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r){"use strict";if(e=t(e),r=t(r),e===r)return 0;if(!e||!r)return Math.max(e.length,r.length);for(var n=new Array(r.length+1),i=0;i<n.length;++i)n[i]=i;for(i=0;i<e.length;++i){for(var a=i+1,o=0;o<r.length;++o){var u=a;a=n[o]+(e.charAt(i)===r.charAt(o)?0:1);var p=u+1;a>p&&(a=p),p=n[o+1]+1,a>p&&(a=p),n[o]=u}n[o]=a}return a}},{"./helper/makeString":21}],30:[function(e,r){r.exports=function(e){return null==e?[]:String(e).split(/\r\n?|\n/)}},{}],31:[function(e,r){var t=e("./pad");r.exports=function(e,r,n){return t(e,r,n)}},{"./pad":36}],32:[function(e,r){var t=e("./pad");r.exports=function(e,r,n){return t(e,r,n,"both")}},{"./pad":36}],33:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/defaultToWhiteSpace"),i=String.prototype.trimLeft;r.exports=function(e,r){return e=t(e),!r&&i?i.call(e):(r=n(r),e.replace(new RegExp("^"+r+"+"),""))}},{"./helper/defaultToWhiteSpace":17,"./helper/makeString":21}],34:[function(e,r){r.exports=function(e,r){if(e==r)return 0;if(!e)return-1;if(!r)return 1;for(var t=/(\.\d+|\d+|\D+)/g,n=String(e).match(t),i=String(r).match(t),a=Math.min(n.length,i.length),o=0;a>o;o++){var u=n[o],p=i[o];if(u!==p){var c=+u,s=+p;return c===c&&s===s?c>s?1:-1:p>u?-1:1}}return n.length!=i.length?n.length-i.length:r>e?-1:1}},{}],35:[function(e,r){r.exports=function(e,r,t,n){if(isNaN(e)||null==e)return"";e=e.toFixed(~~r),n="string"==typeof n?n:",";var i=e.split("."),a=i[0],o=i[1]?(t||".")+i[1]:"";return a.replace(/(\d)(?=(?:\d{3})+$)/g,"$1"+n)+o}},{}],36:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/strRepeat");r.exports=function(e,r,i,a){e=t(e),r=~~r;var o=0;switch(i?i.length>1&&(i=i.charAt(0)):i=" ",a){case"right":return o=r-e.length,e+n(i,o);case"both":return o=r-e.length,n(i,Math.ceil(o/2))+e+n(i,Math.floor(o/2));default:return o=r-e.length,n(i,o)+e}}},{"./helper/makeString":21,"./helper/strRepeat":22}],37:[function(e,r){var t=e("./helper/adjacent");r.exports=function(e){return t(e,-1)}},{"./helper/adjacent":16}],38:[function(e,r){var t=e("./helper/makeString"),n=e("./rtrim");r.exports=function(e,r,i){if(e=t(e),r=~~r,i=null!=i?String(i):"...",e.length<=r)return e;var a=function(e){return e.toUpperCase()!==e.toLowerCase()?"A":" "},o=e.slice(0,r+1).replace(/.(?=\W*\w*$)/g,a);return o=o.slice(o.length-2).match(/\w\w/)?o.replace(/\s*\S+$/,""):n(o.slice(0,o.length-1)),(o+i).length>e.length?e:e.slice(0,o.length)+i}},{"./helper/makeString":21,"./rtrim":44}],39:[function(e,r){var t=e("./surround");r.exports=function(e,r){return t(e,r||'"')}},{"./surround":55}],40:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/strRepeat");r.exports=function i(e,r,a){if(e=t(e),r=~~r,null==a)return n(e,r);for(var i=[];r>0;i[--r]=e);return i.join(a)}},{"./helper/makeString":21,"./helper/strRepeat":22}],41:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r,n,i){var a=i===!0?"gi":"g",o=new RegExp(r,a);return t(e).replace(o,n)}},{"./helper/makeString":21}],42:[function(e,r){var t=e("./chars");r.exports=function(e){return t(e).reverse().join("")}},{"./chars":3}],43:[function(e,r){var t=e("./pad");r.exports=function(e,r,n){return t(e,r,n,"right")}},{"./pad":36}],44:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/defaultToWhiteSpace"),i=String.prototype.trimRight;r.exports=function(e,r){return e=t(e),!r&&i?i.call(e):(r=n(r),e.replace(new RegExp(r+"+$"),""))}},{"./helper/defaultToWhiteSpace":17,"./helper/makeString":21}],45:[function(e,r){var t=(e("./helper/makeString"),e("./helper/defaultToWhiteSpace"),e("./trim")),n=e("./dasherize"),i=e("./cleanDiacritics");r.exports=function(e){return t(n(i(e).replace(/[^\w\s-]/g,"-")),"-")}},{"./cleanDiacritics":7,"./dasherize":9,"./helper/defaultToWhiteSpace":17,"./helper/makeString":21,"./trim":62}],46:[function(e,r){var t=e("./chars");r.exports=function(e,r,n,i){var a=t(e);return a.splice(~~r,~~n,i),a.join("")}},{"./chars":3}],47:[function(e,r){var t=e("./helper/strRepeat"),n=Object.prototype.toString,i=function(){function e(e){return n.call(e).slice(8,-1).toLowerCase()}var r=t,a=function(){return a.cache.hasOwnProperty(arguments[0])||(a.cache[arguments[0]]=a.parse(arguments[0])),a.format.call(null,a.cache[arguments[0]],arguments)};return a.format=function(t,n){var a,o,u,p,c,s,l,f=1,h=t.length,g="",m=[];for(o=0;h>o;o++)if(g=e(t[o]),"string"===g)m.push(t[o]);else if("array"===g){if(p=t[o],p[2])for(a=n[f],u=0;u<p[2].length;u++){if(!a.hasOwnProperty(p[2][u]))throw new Error(i('[_.sprintf] property "%s" does not exist',p[2][u]));a=a[p[2][u]]}else a=p[1]?n[p[1]]:n[f++];if(/[^s]/.test(p[8])&&"number"!=e(a))throw new Error(i("[_.sprintf] expecting number but found %s",e(a)));switch(p[8]){case"b":a=a.toString(2);break;case"c":a=String.fromCharCode(a);break;case"d":a=parseInt(a,10);break;case"e":a=p[7]?a.toExponential(p[7]):a.toExponential();break;case"f":a=p[7]?parseFloat(a).toFixed(p[7]):parseFloat(a);break;case"o":a=a.toString(8);break;case"s":a=(a=String(a))&&p[7]?a.substring(0,p[7]):a;break;case"u":a=Math.abs(a);break;case"x":a=a.toString(16);break;case"X":a=a.toString(16).toUpperCase()}a=/[def]/.test(p[8])&&p[3]&&a>=0?"+"+a:a,s=p[4]?"0"==p[4]?"0":p[4].charAt(1):" ",l=p[6]-String(a).length,c=p[6]?r(s,l):"",m.push(p[5]?a+c:c+a)}return m.join("")},a.cache={},a.parse=function(e){for(var r=e,t=[],n=[],i=0;r;){if(null!==(t=/^[^\x25]+/.exec(r)))n.push(t[0]);else if(null!==(t=/^\x25{2}/.exec(r)))n.push("%");else{if(null===(t=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(r)))throw new Error("[_.sprintf] huh?");if(t[2]){i|=1;var a=[],o=t[2],u=[];if(null===(u=/^([a-z_][a-z_\d]*)/i.exec(o)))throw new Error("[_.sprintf] huh?");for(a.push(u[1]);""!==(o=o.substring(u[0].length));)if(null!==(u=/^\.([a-z_][a-z_\d]*)/i.exec(o)))a.push(u[1]);else{if(null===(u=/^\[(\d+)\]/.exec(o)))throw new Error("[_.sprintf] huh?");a.push(u[1])}t[2]=a}else i|=2;if(3===i)throw new Error("[_.sprintf] mixing positional and named placeholders is not (yet) supported");n.push(t)}r=r.substring(t[0].length)}return n},a}();r.exports=i},{"./helper/strRepeat":22}],48:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/toPositive");r.exports=function(e,r,i){return e=t(e),r=""+r,i=null==i?0:Math.min(n(i),e.length),e.lastIndexOf(r,i)===i}},{"./helper/makeString":21,"./helper/toPositive":23}],49:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r){e=t(e),r=t(r);var n=r?e.indexOf(r):-1;return~n?e.slice(0,n):e}},{"./helper/makeString":21}],50:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r){e=t(e),r=t(r);var n=e.lastIndexOf(r);return~n?e.slice(0,n):e}},{"./helper/makeString":21}],51:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r){e=t(e),r=t(r);var n=r?e.indexOf(r):-1;return~n?e.slice(n+r.length,e.length):e}},{"./helper/makeString":21}],52:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r){e=t(e),r=t(r);var n=r?e.lastIndexOf(r):-1;return~n?e.slice(n+r.length,e.length):e}},{"./helper/makeString":21}],53:[function(e,r){var t=e("./helper/makeString");r.exports=function(e){return t(e).replace(/<\/?[^>]+>/g,"")}},{"./helper/makeString":21}],54:[function(e,r){var t=e("./helper/adjacent");r.exports=function(e){return t(e,1)}},{"./helper/adjacent":16}],55:[function(e,r){r.exports=function(e,r){return[r,e,r].join("")}},{}],56:[function(e,r){var t=e("./helper/makeString");r.exports=function(e){return t(e).replace(/\S/g,function(e){return e===e.toUpperCase()?e.toLowerCase():e.toUpperCase()})}},{"./helper/makeString":21}],57:[function(e,r){var t=e("./helper/makeString");r.exports=function(e){return t(e).toLowerCase().replace(/(?:^|\s|-)\S/g,function(e){return e.toUpperCase()})}},{"./helper/makeString":21}],58:[function(e,r){function t(e,r){var t,n,i=e.toLowerCase();for(r=[].concat(r),t=0;t<r.length;t+=1)if(n=r[t]){if(n.test&&n.test(e))return!0;if(n.toLowerCase()===i)return!0}}var n=e("./trim");r.exports=function(e,r,i){return"number"==typeof e&&(e=""+e),"string"!=typeof e?!!e:(e=n(e),t(e,r||["true","1"])?!0:t(e,i||["false","0"])?!1:void 0)}},{"./trim":62}],59:[function(e,r){e("./trim");r.exports=function(e,r){if(null==e)return 0;var t=Math.pow(10,isFinite(r)?r:0);return Math.round(e*t)/t}},{"./trim":62}],60:[function(e,r){var t=e("./rtrim");r.exports=function(e,r,n,i){r=r||", ",n=n||" and ";var a=e.slice(),o=a.pop();return e.length>2&&i&&(n=t(r)+n),a.length?a.join(r)+n+o:o}},{"./rtrim":44}],61:[function(e,r){var t=e("./toSentence");r.exports=function(e,r,n){return t(e,r,n,!0)}},{"./toSentence":60}],62:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/defaultToWhiteSpace"),i=String.prototype.trim;r.exports=function(e,r){return e=t(e),!r&&i?i.call(e):(r=n(r),e.replace(new RegExp("^"+r+"+|"+r+"+$","g"),""))}},{"./helper/defaultToWhiteSpace":17,"./helper/makeString":21}],63:[function(e,r){var t=e("./helper/makeString");r.exports=function(e,r,n){return e=t(e),n=n||"...",r=~~r,e.length>r?e.slice(0,r)+n:e}},{"./helper/makeString":21}],64:[function(e,r){var t=e("./trim");r.exports=function(e){return t(e).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()}},{"./trim":62}],65:[function(e,r){var t=e("./helper/makeString"),n=e("./helper/htmlEntities");r.exports=function(e){return t(e).replace(/\&([^;]+);/g,function(e,r){var t;return r in n?n[r]:(t=r.match(/^#x([\da-fA-F]+)$/))?String.fromCharCode(parseInt(t[1],16)):(t=r.match(/^#(\d+)$/))?String.fromCharCode(~~t[1]):e})}},{"./helper/htmlEntities":20,"./helper/makeString":21}],66:[function(e,r){r.exports=function(e,r){return r=r||'"',e[0]===r&&e[e.length-1]===r?e.slice(1,e.length-1):e}},{}],67:[function(e,r){var t=e("./sprintf");r.exports=function(e,r){return r.unshift(e),t.apply(null,r)}},{"./sprintf":47}],68:[function(e,r){var t=e("./isBlank"),n=e("./trim");r.exports=function(e,r){return t(e)?[]:n(e,r).split(r||/\s+/)}},{"./isBlank":27,"./trim":62}],69:[function(e,r){makeString=e("./helper/makeString"),r.exports=function(e,r){if(e=makeString(e),r=r||{},width=r.width||75,seperator=r.seperator||"\n",cut=r.cut||!1,preserveSpaces=r.preserveSpaces||!1,trailingSpaces=r.trailingSpaces||!1,0>=width)return e;if(cut){for(index=0,result="";index<e.length;)index%width==0&&index>0&&(result+=seperator),result+=e.charAt(index),index++;if(trailingSpaces)for(;index%width>0;)result+=" ",index++;return result}for(words=e.split(" "),result="",current_column=0;words.length>0;){if(1+words[0].length+current_column>width&&current_column>0){if(preserveSpaces)result+=" ",current_column++;else if(trailingSpaces)for(;width>current_column;)result+=" ",current_column++;result+=seperator,current_column=0}current_column>0&&(result+=" ",current_column++),result+=words[0],current_column+=words[0].length,words.shift()}if(trailingSpaces)for(;width>current_column;)result+=" ",current_column++;return result}},{"./helper/makeString":21}]},{},[15])(15)});

@@ -11,2 +11,3 @@ var gulp = require('gulp-param')(require('gulp'), process.argv),

browserify = require('gulp-browserify'),
header = require('gulp-header'),
SRC = 'index.js',

@@ -16,4 +17,7 @@ DEST = 'dist',

MIN_FILE = 'underscore.string.min.js',
VERSION_FILES = ['./package.json', './component.json', './bower.json'];
VERSION_FILES_JS = [SRC, 'package.js'];
VERSION_FILES = ['./package.json', './component.json', './bower.json'],
VERSION_FILES_JS = [SRC, 'package.js'],
package = require('./package.json'),
headerText = '/* ' + package.name + ' ' + package.version + ' | ' +
package.license + ' licensed | ' + package.homepage + ' */\n\n';

@@ -56,2 +60,3 @@ gulp.task('test', ['browserify'], function(cov) {

}))
.pipe(header(headerText))
.pipe(rename('underscore.string.js'))

@@ -90,4 +95,5 @@ .pipe(gulp.dest(DEST));

.pipe(uglify())
.pipe(header(headerText))
.pipe(rename(MIN_FILE))
.pipe(gulp.dest(DEST));
});

@@ -6,3 +6,3 @@ // Underscore.string

// Some code is borrowed from MooTools and Alexandru Marasteanu.
// Version '3.1.1'
// Version '3.2.0'

@@ -17,3 +17,3 @@ 'use strict';

s.VERSION = '3.1.1';
s.VERSION = '3.2.0';

@@ -79,2 +79,3 @@ s.isBlank = require('./isBlank');

s.escapeRegExp = require('./helper/escapeRegExp');
s.wrap = require('./wrap');

@@ -81,0 +82,0 @@ // Aliases

module.exports = function lines(str) {
if (str == null) return [];
return String(str).split(/\r?\n/);
return String(str).split(/\r\n?|\n/);
};

@@ -6,3 +6,3 @@ // package metadata file for Meteor.js

summary: 'underscore.string (official): String manipulation extensions for Underscore.js javascript library.',
version: '3.1.1',
version: '3.2.0',
git: 'https://github.com/epeli/underscore.string.git',

@@ -9,0 +9,0 @@ documentation: 'README.markdown'

{
"name": "underscore.string",
"version": "3.1.1",
"version": "3.2.0",
"description": "String manipulation extensions for Underscore.js javascript library.",

@@ -43,2 +43,3 @@ "homepage": "http://epeli.github.com/underscore.string/",

"gulp-bump": "~0.1.11",
"gulp-header": "^1.2.2",
"gulp-istanbul": "^0.6.0",

@@ -45,0 +46,0 @@ "gulp-mocha": "^2.0.0",

@@ -5,14 +5,6 @@ var makeString = require('./helper/makeString');

var dasherize = require('./dasherize');
var cleanDiacritics = require("./cleanDiacritics");
module.exports = function slugify(str) {
var from = "ąàáäâãåæăćčĉęèéëêĝĥìíïîĵłľńňòóöőôõðøśșšŝťțŭùúüűûñÿýçżźž",
to = "aaaaaaaaaccceeeeeghiiiijllnnoooooooossssttuuuuuunyyczzz",
regex = new RegExp(defaultToWhiteSpace(from), 'g');
str = makeString(str).toLowerCase().replace(regex, function(c){
var index = from.indexOf(c);
return to.charAt(index) || '-';
});
return trim(dasherize(str.replace(/[^\w\s-]/g, '-')), '-');
return trim(dasherize(cleanDiacritics(str).replace(/[^\w\s-]/g, '-')), '-');
};

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