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

lodash-contrib

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash-contrib - npm Package Compare versions

Comparing version 241.4.7 to 241.4.8

77

_.util.strings.js

@@ -20,14 +20,14 @@ // lodash-contrib (lodash.util.strings.js 0.0.1)

var urlDecode = function(s) {
var urlDecode = function (s) {
return decodeURIComponent(s.replace(plusRegex, '%20'));
};
var buildParams = function(prefix, val, top) {
var buildParams = function (prefix, val, top) {
if (_.isUndefined(top)) top = true;
if (_.isArray(val)) {
return _.map(val, function(value, key) {
return _.map(val, function (value, key) {
return buildParams(top ? key : prefix + '[]', value, false);
}).join('&');
} else if (_.isObject(val)) {
return _.map(val, function(value, key) {
return _.map(val, function (value, key) {
return buildParams(top ? key : prefix + '[' + key + ']', value, false);

@@ -45,3 +45,3 @@ }).join('&');

// Explodes a string into an array of chars
explode: function(s) {
explode: function (s) {
return s.split('');

@@ -51,14 +51,14 @@ },

// Parses a query string into a hash
fromQuery: function(str) {
fromQuery: function (str) {
var parameters = str.split('&'),
obj = {},
parameter,
key,
match,
lastKey,
subKey,
depth;
obj = {},
parameter,
key,
match,
lastKey,
subKey,
depth;
// Iterate over key/value pairs
_.each(parameters, function(parameter) {
_.each(parameters, function (parameter) {
parameter = parameter.split('=');

@@ -100,3 +100,3 @@ key = urlDecode(parameter[0]);

// Implodes and array of chars into a string
implode: function(a) {
implode: function (a) {
return a.join('');

@@ -106,15 +106,22 @@ },

// Converts a string to camel case
camelCase : function( string ){
return string.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });
camelCase: function (string) {
return string.replace(/[-_\s](\w)/g, function ($1) { return $1[1].toUpperCase(); });
},
// Converts camel case to dashed (opposite of _.camelCase)
toDash : function( string ){
string = string.replace(/([A-Z])/g, function($1){return "-"+$1.toLowerCase();});
toDash: function (string) {
string = string.replace(/([A-Z])/g, function ($1) {return "-" + $1.toLowerCase();});
// remove first dash
return ( string.charAt( 0 ) == '-' ) ? string.substr(1) : string;
return ( string.charAt(0) == '-' ) ? string.substr(1) : string;
},
// Converts camel case to snake_case
snakeCase: function (string) {
string = string.replace(/([A-Z])/g, function ($1) {return "_" + $1.toLowerCase();});
// remove first underscore
return ( string.charAt(0) == '_' ) ? string.substr(1) : string;
},
// Creates a query string from a hash
toQuery: function(obj) {
toQuery: function (obj) {
return buildParams('', obj);

@@ -124,3 +131,3 @@ },

// Reports whether a string contains a search string.
strContains: function(str, search) {
strContains: function (str, search) {
if (typeof str != 'string') throw new TypeError;

@@ -130,7 +137,12 @@ return (str.indexOf(search) != -1);

// Reports whether a string contains a search string.
// Upper case first letter.
capitalize: function capitalize(string) {
return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();
return string.charAt(0).toUpperCase() + string.slice(1);
},
// Upper case first letter in every word.
titleCase: function capitalize(string) {
return string.replace(/(\b.)/g, function ($1) {return $1.toUpperCase();});
},
// Slugify a string. Makes lowercase, and converts dots and spaces to dashes.

@@ -147,11 +159,10 @@ slugify: function (urlString) {

humanize: function (slugish) {
return slugish
// Replace _ with a space
.replace(/_/g, ' ')
// insert a space between lower & upper
.replace(/([a-z])([A-Z])/g, '$1 $2')
// space before last upper in a sequence followed by lower
.replace(/\b([A-Z]+)([A-Z])([a-z])/, '$1 $2$3')
// uppercase the first character
.replace(/^./, function(str){ return str.toUpperCase(); });
return _.capitalize(slugish
// Replace _ with a space
.replace(/_/g, ' ')
// insert a space between lower & upper
.replace(/([a-z])([A-Z])/g, '$1 $2')
// space before last upper in a sequence followed by lower
.replace(/\b([A-Z]+)([A-Z])([a-z])/, '$1 $2$3')
);
},

@@ -158,0 +169,0 @@

@@ -1,5 +0,5 @@

// lodash-contrib v241.2.0
// lodash-contrib v241.4.7
// =========================
// > https://github.com/Empeeric/lodash-contrib
// >
// > (c) 2013 Michael Fogus, DocumentCloud and Investigative Reporters & Editors

@@ -26,3 +26,4 @@ // > (c) 2013 Refael Ackermann & Empeeric

var slice = Array.prototype.slice,
concat = Array.prototype.concat;
concat = Array.prototype.concat,
sort = Array.prototype.sort;

@@ -203,2 +204,32 @@ var existy = function(x) { return x != null; };

return slice.call(obj).reverse();
},
// Returns copy or array sorted according to arbitrary ordering
// order must be an array of values; defines the custom sort
// key must be one of: missing/null, a string, or a function;
collate: function(array, order, key) {
if (!_.isArray(array)) throw new TypeError("expected an array as the first argument");
if (!_.isArray(order)) throw new TypeError("expected an array as the second argument");
return sort.call(array, function (a, b) {
if(_.isFunction(key)) {
valA = key.call(a);
valB = key.call(b);
} else if(existy(key)) {
valA = a[key];
valB = b[key];
} else {
valA = a;
valB = b;
}
var rankA = _.indexOf(order, valA);
var rankB = _.indexOf(order, valB);
if(rankA === -1) return 1;
if(rankB === -1) return -1;
return rankA - rankB;
});
}

@@ -972,22 +1003,2 @@ });

// Takes a method-style function (one which uses `this`) and pushes
// `this` into the argument list. The returned function uses its first
// argument as the receiver/context of the original function, and the rest
// of the arguments are used as the original's entire argument list.
functionalize: function(method) {
return function(ctx /*, args */) {
return method.apply(ctx, _.rest(arguments));
};
},
// Takes a function and pulls the first argument out of the argument
// list and into `this` position. The returned function calls the original
// with its receiver (`this`) prepending the argument list. The original
// is called with a receiver of `null`.
methodize: function(func) {
return function(/* args */) {
return func.apply(null, _.cons(this, arguments));
};
},
k: _.always,

@@ -1419,5 +1430,2 @@ t: _.pipeline

// Check if an object is an object literal, since _.isObject(function() {}) === _.isObject([]) === true
isPlainObject: function(x) { return _.isObject(x) && x.constructor === root.Object; },
// These do what you think that they do

@@ -1461,12 +1469,2 @@ isZero: function(x) { return 0 === x; },

// checks if a string is a valid JSON
isJSON: function(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
},
// Returns true if its arguments are monotonically

@@ -1952,24 +1950,20 @@ // increaing values; false otherwise.

var plusRegex = /\+/g;
var spaceRegex = /\%20/g;
var bracketRegex = /(?:([^\[]+))|(?:\[(.*?)\])/g;
var urlDecode = function(s) {
var urlDecode = function (s) {
return decodeURIComponent(s.replace(plusRegex, '%20'));
};
var urlEncode = function(s) {
return encodeURIComponent(s).replace(spaceRegex, '+');
};
var buildParams = function(prefix, val, top) {
var buildParams = function (prefix, val, top) {
if (_.isUndefined(top)) top = true;
if (_.isArray(val)) {
return _.map(val, function(value, key) {
return _.map(val, function (value, key) {
return buildParams(top ? key : prefix + '[]', value, false);
}).join('&');
} else if (_.isObject(val)) {
return _.map(val, function(value, key) {
return _.map(val, function (value, key) {
return buildParams(top ? key : prefix + '[' + key + ']', value, false);
}).join('&');
} else {
return urlEncode(prefix) + '=' + urlEncode(val);
return encodeURIComponent(prefix) + '=' + encodeURIComponent(val);
}

@@ -1988,14 +1982,14 @@ };

// Parses a query string into a hash
fromQuery: function(str) {
fromQuery: function (str) {
var parameters = str.split('&'),
obj = {},
parameter,
key,
match,
lastKey,
subKey,
depth;
obj = {},
parameter,
key,
match,
lastKey,
subKey,
depth;
// Iterate over key/value pairs
_.each(parameters, function(parameter) {
_.each(parameters, function (parameter) {
parameter = parameter.split('=');

@@ -2043,5 +2037,3 @@ key = urlDecode(parameter[0]);

camelCase: function (string) {
return string.replace(/-([a-z])/g, function (g) {
return g[1].toUpperCase();
});
return string.replace(/[-_\s](\w)/g, function ($1) { return $1[1].toUpperCase(); });
},

@@ -2051,5 +2043,3 @@

toDash: function (string) {
string = string.replace(/([A-Z])/g, function ($1) {
return "-" + $1.toLowerCase();
});
string = string.replace(/([A-Z])/g, function ($1) {return "-" + $1.toLowerCase();});
// remove first dash

@@ -2059,4 +2049,11 @@ return ( string.charAt(0) == '-' ) ? string.substr(1) : string;

// Converts camel case to snake_case
snakeCase: function (string) {
string = string.replace(/([A-Z])/g, function ($1) {return "_" + $1.toLowerCase();});
// remove first underscore
return ( string.charAt(0) == '_' ) ? string.substr(1) : string;
},
// Creates a query string from a hash
toQuery: function(obj) {
toQuery: function (obj) {
return buildParams('', obj);

@@ -2066,3 +2063,3 @@ },

// Reports whether a string contains a search string.
strContains: function(str, search) {
strContains: function (str, search) {
if (typeof str != 'string') throw new TypeError;

@@ -2072,10 +2069,36 @@ return (str.indexOf(search) != -1);

// Reports whether a string contains a search string.
// Upper case first letter.
capitalize: function capitalize(string) {
return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();
return string.charAt(0).toUpperCase() + string.slice(1);
},
// Upper case first letter in every word.
titleCase: function capitalize(string) {
return string.replace(/(\b.)/g, function ($1) {return $1.toUpperCase();});
},
// Slugify a string. Makes lowercase, and converts dots and spaces to dashes.
slugify: function (urlString) {
return urlString.replace(/ /g, '-').replace(/\./, '').toLowerCase();
},
// Slugify a string. Makes lowercase, and converts dots and spaces to dashes.
regexEscape: function (regexCandidate) {
return regexCandidate.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
},
humanize: function (slugish) {
return _.capitalize(slugish
// Replace _ with a space
.replace(/_/g, ' ')
// insert a space between lower & upper
.replace(/([a-z])([A-Z])/g, '$1 $2')
// space before last upper in a sequence followed by lower
.replace(/\b([A-Z]+)([A-Z])([a-z])/, '$1 $2$3')
);
},
stripTags: function (suspectString) {
var str = suspectString.replace(/<\/?[^<>]*>/gi, '');
return str;
}

@@ -2086,2 +2109,3 @@

// lodash-contrib (lodash.util.trampolines.js 0.0.1)

@@ -2088,0 +2112,0 @@ // (c) 2013 Michael Fogus, DocumentCloud and Investigative Reporters & Editors

@@ -1,5 +0,5 @@

// lodash-contrib v241.2.0
// lodash-contrib v241.4.7
// =========================
// > https://github.com/Empeeric/lodash-contrib
// >
// > (c) 2013 Michael Fogus, DocumentCloud and Investigative Reporters & Editors

@@ -9,2 +9,2 @@ // > (c) 2013 Refael Ackermann & Empeeric

(function(n){var r=n._||require("lodash"),t=Array.prototype.slice,u=Array.prototype.concat,e=function(n){return null!=n};r.mixin({cat:function(){return r.reduce(arguments,function(n,e){return r.isArguments(e)?u.call(n,t.call(e)):u.call(n,e)},[])},cons:function(n,t){return r.cat([n],t)},partition:function(n,t,u){var e=function(n){if(null==n)return[];var i=r.take(n,t);return t===r.size(i)?r.cons(i,e(r.drop(n,t))):u?[r.take(r.cat(i,u),t)]:[]};return e(n)},partitionAll:function(n,t,u){u=null!=u?u:t;var e=function(n,t,u){return r.isEmpty(n)?[]:r.cons(r.take(n,t),e(r.drop(n,u),t,u))};return e(n,t,u)},mapcat:function(n,t){return r.cat.apply(null,r.map(n,t))},interpose:function(n,u){if(!r.isArray(n))throw new TypeError;var e=r.size(n);return 0===e?n:1===e?n:t.call(r.mapcat(n,function(n){return r.cons(n,[u])}),0,-1)},weave:function(){return r.some(arguments)?1==arguments.length?arguments[0]:r.filter(r.flatten(r.zip.apply(null,arguments),!0),function(n){return null!=n}):[]},interleave:r.weave,repeat:function(n,t){return r.times(n,function(){return t})},cycle:function(n,t){return r.flatten(r.times(n,function(){return t}),!0)},splitAt:function(n,t){return[r.take(n,t),r.drop(n,t)]},iterateUntil:function(n,r,t){for(var u=[],e=n(t);r(e);)u.push(e),e=n(e);return u},takeSkipping:function(n,t){var u=[],e=r.size(n);if(0>=t)return[];if(1===t)return n;for(var i=0;e>i;i+=t)u.push(n[i]);return u},reductions:function(n,t,u){var e=[],i=u;return r.each(n,function(r,u){i=t(i,n[u]),e.push(i)}),e},keepIndexed:function(n,t){return r.filter(r.map(r.range(r.size(n)),function(r){return t(r,n[r])}),e)},reverseOrder:function(n){if("string"==typeof n)throw new TypeError("Strings cannot be reversed by _.reverseOrder");return t.call(n).reverse()}})})(this),function(n){var r=n._||require("lodash"),t=Array.prototype.slice,u=Array.prototype.concat,e=function(n){return null!=n},i=function(n){return n!==!1&&e(n)},o=function(n){return r.isArray(n)||r.isArguments(n)};r.mixin({second:function(n,r,u){return null==n?void 0:null==r||u?n[1]:t.call(n,1,r)},third:function(n,r,u){return null==n?void 0:null==r||u?n[2]:t.call(n,2,r)},nth:function(n,r,t){return null==r||t?void 0:n[r]},takeWhile:function(n,t){if(!o(n))throw new TypeError;for(var u=r.size(n),e=0;u>e&&i(t(n[e]));e++);return r.take(n,e)},dropWhile:function(n,t){if(!o(n))throw new TypeError;for(var u=r.size(n),e=0;u>e&&i(t(n[e]));e++);return r.drop(n,e)},splitWith:function(n,t){return[r.takeWhile(n,t),r.dropWhile(n,t)]},partitionBy:function(n,t){if(r.isEmpty(n)||!e(n))return[];var i=r.first(n),o=t(i),a=u.call([i],r.takeWhile(r.rest(n),function(n){return r.isEqual(o,t(n))}));return u.call([a],r.partitionBy(r.drop(n,r.size(a)),t))},best:function(n,t){return r.reduce(n,function(n,r){return t(n,r)?n:r})},keep:function(n,t){if(!o(n))throw new TypeError("expected an array as the first argument");return r.filter(r.map(n,function(n){return t(n)}),e)}})}(this),function(n){function r(n){return e.isElement(n)?n.children:n}function t(n,r,t,u,c,l){var f=[];return function s(n,p,h){if(e.isObject(n)){if(f.indexOf(n)>=0)throw new TypeError(a);f.push(n)}if(t){var v=t.call(c,n,p,h);if(v===o)return o;if(v===i)return}var m,g=r(n);if(e.isObject(g)&&!e.isEmpty(g)){l&&(m=e.isArray(n)?[]:{});var y=e.any(g,function(r,t){var u=s(r,t,n);return u===o?!0:(m&&(m[t]=u),void 0)});if(y)return o}return u?u.call(c,n,p,h,m):void 0}(n)}function u(n,r,t){var u=[];return this.preorder(n,function(n,o){return t||o!=r?(e.has(n,r)&&(u[u.length]=n[r]),void 0):i}),u}var e=n._||require("lodash"),i={},o={},a="Not a tree: same object found in two different branches",c={find:function(n,r,t){var u;return this.preorder(n,function(n,e,i){return r.call(t,n,e,i)?(u=n,o):void 0},t),u},filter:function(n,r,t,u){var e=[];return null==n?e:(r(n,function(n,r,i){t.call(u,n,r,i)&&e.push(n)},null,this._traversalStrategy),e)},reject:function(n,r,t,u){return this.filter(n,r,function(n,r,e){return!t.call(u,n,r,e)})},map:function(n,r,t,u){var e=[];return r(n,function(n,r,i){e[e.length]=t.call(u,n,r,i)},null,this._traversalStrategy),e},pluck:function(n,r){return u.call(this,n,r,!1)},pluckRec:function(n,r){return u.call(this,n,r,!0)},postorder:function(n,r,u,e){e=e||this._traversalStrategy,t(n,e,null,r,u)},preorder:function(n,r,u,e){e=e||this._traversalStrategy,t(n,e,r,null,u)},reduce:function(n,r,u,e){var i=function(n,t,e,i){return r(i||u,n,t,e)};return t(n,this._traversalStrategy,null,i,e,!0)}};c.collect=c.map,c.detect=c.find,c.select=c.filter,e.walk=function(n){var t=e.clone(c);return e.bindAll.apply(null,[t].concat(e.keys(t))),t._traversalStrategy=n||r,t},e.extend(e.walk,e.walk())}(this),function(n){function r(n){return function(){if(1===arguments.length)return n.apply(this,arguments);throw new RangeError("Only a single argument may be accepted.")}}var t=n._||require("lodash"),u=function(){function n(t,u,e,i,o,a){return a===!0?i.unshift(o):i.push(o),i.length==e?t.apply(u,i):r(function(){return n(t,u,e,i.slice(0),arguments[0],a)})}return function(t,u){var e=this;return r(function(){return n(t,e,t.length,[],arguments[0],u)})}}(),e=function(){var n=[];return function(r){if("function"!=typeof r)throw Error("Argument 1 must be a function.");var t=r.length;return void 0===n[t]&&(n[t]=function(n){return function(){if(arguments.length!==t)throw new RangeError(t+" arguments must be applied.");return n.apply(this,arguments)}}),n[t](r)}}();t.mixin({fix:function(n){var r=t.rest(arguments),u=function(){for(var u=r.slice(),e=0,i=0;u.length>i||arguments.length>e;i++)u[i]===t&&(u[i]=arguments[e++]);return n.apply(null,u)};return u._original=n,u},unary:function(n){return function(r){return n.call(this,r)}},binary:function(n){return function(r,t){return n.call(this,r,t)}},ternary:function(n){return function(r,t,u){return n.call(this,r,t,u)}},quaternary:function(n){return function(r,t,u,e){return n.call(this,r,t,u,e)}},curry:u,rCurry:function(n){return u.call(this,n,!0)},curry2:function(n){return r(function(t){return r(function(r){return n.call(this,t,r)})})},curry3:function(n){return r(function(t){return r(function(u){return r(function(r){return n.call(this,t,u,r)})})})},rcurry2:function(n){return r(function(t){return r(function(r){return n.call(this,r,t)})})},rcurry3:function(n){return r(function(t){return r(function(u){return r(function(r){return n.call(this,r,u,t)})})})},enforce:e}),t.arity=function(){var n={};return function r(t,u){if(null==n[t]){for(var e=Array(t),i=0;t>i;++i)e[i]="__"+i;var o=e.join(),a="return function ("+o+") { return fun.apply(this, arguments); };";n[t]=Function(["fun"],a)}return null==u?function(n){return r(t,n)}:n[t](u)}}()}(this),function(n){function r(n,r){return t.arity(n.length,function(){return n.apply(this,a.call(arguments,r))})}var t=n._||require("lodash"),u=function(n){return null!=n},e=function(n){return n!==!1&&u(n)},i=[].reverse,o=[].slice,a=[].map,c=function(n){return function(r,t){return 1===arguments.length?function(t){return n(r,t)}:n(r,t)}};t.mixin({always:function(n){return function(){return n}},pipeline:function(){var n=t.isArray(arguments[0])?arguments[0]:arguments;return function(r){return t.reduce(n,function(n,r){return r(n)},r)}},conjoin:function(){var n=arguments;return function(r){return t.every(r,function(r){return t.every(n,function(n){return n(r)})})}},disjoin:function(){var n=arguments;return function(r){return t.some(r,function(r){return t.some(n,function(n){return n(r)})})}},comparator:function(n){return function(r,t){return e(n(r,t))?-1:e(n(t,r))?1:0}},complement:function(n){return function(){return!n.apply(null,arguments)}},splat:function(n){return function(r){return n.apply(null,r)}},unsplat:function(n){var r=n.length;return 1>r?n:1===r?function(){return n.call(this,o.call(arguments,0))}:function(){var t=arguments.length,u=o.call(arguments,0,r-1),e=Math.max(r-t-1,0),i=Array(e),a=o.call(arguments,n.length-1);return n.apply(this,u.concat(i).concat([a]))}},unsplatl:function(n){var r=n.length;return 1>r?n:1===r?function(){return n.call(this,o.call(arguments,0))}:function(){var t=arguments.length,u=o.call(arguments,Math.max(t-r+1,0)),e=o.call(arguments,0,Math.max(t-r+1,0));return n.apply(this,[e].concat(u))}},mapArgs:c(r),juxt:function(){var n=arguments;return function(){var r=arguments;return t.map(n,function(n){return n.apply(null,r)})}},fnull:function(n){var r=t.rest(arguments);return function(){for(var e=t.toArray(arguments),i=t.size(r),o=0;i>o;o++)u(e[o])||(e[o]=r[o]);return n.apply(null,e)}},flip2:function(n){return function(){var r=o.call(arguments);return r[0]=arguments[1],r[1]=arguments[0],n.apply(null,r)}},flip:function(n){return function(){var r=i.call(arguments);return n.apply(null,r)}},functionalize:function(n){return function(r){return n.apply(r,t.rest(arguments))}},methodize:function(n){return function(){return n.apply(null,t.cons(this,arguments))}},k:t.always,t:t.pipeline}),t.unsplatr=t.unsplat,t.mapArgsWith=c(t.flip(r)),t.bound=function(n,r){var u=n[r];if(!t.isFunction(u))throw new TypeError("Expected property to be a function");return t.bind(u,n)}}(this),function(n){var r=n._||require("lodash"),t=Array.prototype.slice;r.mixin({attempt:function(n,u){if(null==n)return void 0;var e=n[u],i=t.call(arguments,2);return r.isFunction(e)?e.apply(n,i):void 0}})}(this),function(n){function r(n){return function(r){return n.call(this,r)}}function t(n,r,t){var u,e;for(u=t!==void 0?t:n(),e=n();null!=e;)u=r.call(e,u,e),e=n();return u}function u(n,r){var t=b;return function(){return t===b?t=n:null!=t&&(t=r.call(t,t)),t}}function e(n,r){var t,u,e=n;return function(){return null!=e?(t=r.call(e,e),u=t[1],e=null!=u?t[0]:void 0,u):void 0}}function i(n,r,t){var u=t;return function(){var t=n();return null==t?t:u=u===void 0?t:r.call(t,u,t)}}function o(n,r,t){var u,e,i=t;return function(){return e=n(),null==e?e:i===void 0?i=e:(u=r.call(e,i,e),i=u[0],u[1])}}function a(n,r){return function(){var t;return t=n(),null!=t?r.call(t,t):void 0}}function c(n,r){var t=null;return function(){var u,e;if(null==t){if(e=n(),null==e)return t=null,void 0;t=r.call(e,e)}for(;null==u;)if(u=t(),null==u){if(e=n(),null==e)return t=null,void 0;t=r.call(e,e)}return u}}function l(n,r){return function(){var t;for(t=n();null!=t;){if(r.call(t,t))return t;t=n()}return void 0}}function f(n,r){return l(n,function(n){return!r(n)})}function s(n,r){return l(n,r)()}function p(n,r,t){for(var u=0;r-->0;)n();return null!=t?function(){return t>=++u?n():void 0}:n}function h(n,r){return p(n,null==r?1:r)}function v(n,r){return p(n,0,null==r?1:r)}function m(n){var r=0;return function(){return n[r++]}}function g(n){var r,t,u;return r=0,u=[],t=function(){var e,i;return e=n[r++],e instanceof Array?(u.push({array:n,index:r}),n=e,r=0,t()):e===void 0?u.length>0?(i=u.pop(),n=i.array,r=i.index,t()):void 0:e}}function y(n){return function(){return n}}function d(n,r,t){return function(){var u;return n>r?void 0:(u=n,n+=t,u)}}function w(n,r,t){return function(){var u;return r>n?void 0:(u=n,n-=t,u)}}function A(n,r,t){return null==n?d(1,1/0,1):null==r?d(n,1/0,1):null==t?r>=n?d(n,r,1):w(n,r,1):t>0?d(n,r,t):0>t?w(n,r,Math.abs(t)):k(n)}var x=n._||require("lodash"),b={},_=r(A);x.iterators={accumulate:i,accumulateWithReturn:o,foldl:t,reduce:t,unfold:u,unfoldWithReturn:e,map:a,mapcat:c,select:l,reject:f,filter:l,find:s,slice:p,drop:h,take:v,List:m,Tree:g,constant:y,K:y,numbers:_,range:A}}(this,void 0),function(n){var r=n._||require("lodash");r.mixin({isInstanceOf:function(n,r){return n instanceof r},isAssociative:function(n){return r.isArray(n)||r.isObject(n)||r.isArguments(n)},isIndexed:function(n){return r.isArray(n)||r.isString(n)||r.isArguments(n)},isSequential:function(n){return r.isArray(n)||r.isArguments(n)},isZero:function(n){return 0===n},isEven:function(n){return r.isFinite(n)&&0===(1&n)},isOdd:function(n){return r.isFinite(n)&&!r.isEven(n)},isPositive:function(n){return n>0},isNegative:function(n){return 0>n},isValidDate:function(n){return r.isDate(n)&&!r.isNaN(n.getTime())},isNumeric:function(n){return!isNaN(parseFloat(n))&&isFinite(n)},isInteger:function(n){return r.isNumeric(n)&&0===n%1},isFloat:function(n){return r.isNumeric(n)&&!r.isInteger(n)},isJSON:function(n){try{JSON.parse(n)}catch(r){return!1}return!0},isIncreasing:function(){var n=r.size(arguments);if(1===n)return!0;if(2===n)return arguments[0]<arguments[1];for(var t=1;n>t;t++)if(arguments[t-1]>=arguments[t])return!1;return!0},isDecreasing:function(){var n=r.size(arguments);if(1===n)return!0;if(2===n)return arguments[0]>arguments[1];for(var t=1;n>t;t++)if(arguments[t-1]<=arguments[t])return!1;return!0}})}(this),function(n){var r=n._||require("lodash"),t=(Array.prototype.slice,Array.prototype.concat),u=function(n){return null!=n},e=function(n){return n!==!1&&u(n)},i=function(n){return r.isArray(n)||r.isObject(n)},o=function(n){return function(r){return function(t){return n(t,r)}}};r.mixin({merge:function(){var n=r.some(arguments)?{}:null;return e(n)&&r.extend.apply(null,t.call([n],r.toArray(arguments))),n},renameKeys:function(n,e){return r.reduce(e,function(r,t,e){return u(n[e])?(r[t]=n[e],r):r},r.omit.apply(null,t.call([n],r.keys(e))))},snapshot:function(n){if(null==n||"object"!=typeof n)return n;var t=new n.constructor;for(var u in n)n.hasOwnProperty(u)&&(t[u]=r.snapshot(n[u]));return t},updatePath:function(n,t,e,o){if(!i(n))throw new TypeError("Attempted to update a non-associative object.");if(!u(e))return t(n);var a=r.isArray(e),c=a?e:[e],l=a?r.snapshot(n):r.clone(n),f=r.last(c),s=l;return r.each(r.initial(c),function(n){o&&!r.has(s,n)&&(s[n]=r.clone(o)),s=s[n]}),s[f]=t(s[f]),l},setPath:function(n,t,e,i){if(!u(e))throw new TypeError("Attempted to set a property at a null path.");return r.updatePath(n,function(){return t},e,i)},frequencies:o(r.countBy)(r.identity)})}(this),function(n){var r=n._||require("lodash"),t=Array.prototype.concat,u=Array.prototype;u.slice,r.mixin({accessor:function(n){return function(r){return r&&r[n]}},dictionary:function(n){return function(r){return n&&r&&n[r]}},selectKeys:function(n,u){return r.pick.apply(null,t.call([n],u))},kv:function(n,t){return r.has(n,t)?[t,n[t]]:void 0},getPath:function e(n,t){return"string"==typeof t&&(t=t.split(".")),void 0===n?void 0:0===t.length?n:null===n?void 0:e(n[r.first(t)],r.rest(t))},hasPath:function i(n,t){"string"==typeof t&&(t=t.split("."));var u=t.length;return null==n&&u>0?!1:t[0]in n?1===u?!0:i(n[r.first(t)],r.rest(t)):!1},pickWhen:function(n,t){var u={};return r.each(n,function(r,e){t(n[e])&&(u[e]=n[e])}),u},omitWhen:function(n,t){return r.pickWhen(n,function(n){return!t(n)})}})}(this),function(n){var r=n._||require("lodash");r.mixin({exists:function(n){return null!=n},truthy:function(n){return n!==!1&&r.exists(n)},falsey:function(n){return!r.truthy(n)},not:function(n){return!n},firstExisting:function(){for(var n=0;arguments.length>n;n++)if(null!=arguments[n])return arguments[n]}})}(this),function(n){function r(n){return function(){return E.reduce(arguments,n)}}function t(n){return function(){for(var r,t=0;arguments.length-1>t;t++)if(r=n(arguments[t],arguments[t+1]),r===!1)return r;return r}}function u(n){return function(){return!n.apply(this,arguments)}}function e(n,r){return n+r}function i(n,r){return n-r}function o(n,r){return n*r}function a(n,r){return n/r}function c(n,r){return n%r}function l(n){return++n}function f(n){return--n}function s(n){return-n}function p(n,r){return n&r}function h(n,r){return n|r}function v(n,r){return n^r}function m(n,r){return n<<r}function g(n,r){return n>>r}function y(n,r){return n>>>r}function d(n){return~n}function w(n,r){return n==r}function A(n,r){return n===r}function x(n){return!n}function b(n,r){return n>r}function k(n,r){return r>n}function _(n,r){return n>=r}function q(n,r){return r>=n}var E=n._||require("lodash");E.mixin({add:r(e),sub:r(i),mul:r(o),div:r(a),mod:c,inc:l,dec:f,neg:s,eq:t(w),seq:t(A),neq:u(t(w)),sneq:u(t(A)),not:x,gt:t(b),lt:t(k),gte:t(_),lte:t(q),bitwiseAnd:r(p),bitwiseOr:r(h),bitwiseXor:r(v),bitwiseNot:d,bitwiseLeft:r(m),bitwiseRight:r(g),bitwiseZ:r(y)})}(this),function(n){var r=n._||require("lodash");r.mixin({explode:function(n){return n.split("")},implode:function(n){return n.join("")},camelCase:function(n){return n.replace(/-([a-z])/g,function(n){return n[1].toUpperCase()})},toDash:function(n){return n=n.replace(/([A-Z])/g,function(n){return"-"+n.toLowerCase()}),"-"==n.charAt(0)?n.substr(1):n},strContains:function(n,r){if("string"!=typeof n)throw new TypeError;return-1!=n.indexOf(r)},capitalize:function(n){return n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()},slugify:function(n){return n.replace(/ /g,"-").replace(/\./,"").toLowerCase()}})}(this),function(n){var r=n._||require("lodash");r.mixin({done:function(n){var t=r(n);return t.stopTrampoline=!0,t},trampoline:function(n){for(var t=n.apply(n,r.rest(arguments));r.isFunction(t)&&(t=t(),!(t instanceof r&&t.stopTrampoline)););return t.value()}})}(this);
!function(a){var b=a._||require("lodash"),c=Array.prototype.slice,d=Array.prototype.concat,e=Array.prototype.sort,f=function(a){return null!=a};b.mixin({cat:function(){return b.reduce(arguments,function(a,e){return b.isArguments(e)?d.call(a,c.call(e)):d.call(a,e)},[])},cons:function(a,c){return b.cat([a],c)},chunk:function(a,c,d){var e=function(a){if(null==a)return[];var f=b.take(a,c);return c===b.size(f)?b.cons(f,e(b.drop(a,c))):d?[b.take(b.cat(f,d),c)]:[]};return e(a)},chunkAll:function(a,c,d){d=null!=d?d:c;var e=function(a,c,d){return b.isEmpty(a)?[]:b.cons(b.take(a,c),e(b.drop(a,d),c,d))};return e(a,c,d)},mapcat:function(a,c){return b.cat.apply(null,b.map(a,c))},interpose:function(a,d){if(!b.isArray(a))throw new TypeError;var e=b.size(a);return 0===e?a:1===e?a:c.call(b.mapcat(a,function(a){return b.cons(a,[d])}),0,-1)},weave:function(){return b.some(arguments)?1==arguments.length?arguments[0]:b.filter(b.flatten(b.zip.apply(null,arguments),!0),function(a){return null!=a}):[]},interleave:b.weave,repeat:function(a,c){return b.times(a,function(){return c})},cycle:function(a,c){return b.flatten(b.times(a,function(){return c}),!0)},splitAt:function(a,c){return[b.take(a,c),b.drop(a,c)]},iterateUntil:function(a,b,c){for(var d=[],e=a(c);b(e);)d.push(e),e=a(e);return d},takeSkipping:function(a,c){var d=[],e=b.size(a);if(0>=c)return[];if(1===c)return a;for(var f=0;e>f;f+=c)d.push(a[f]);return d},reductions:function(a,c,d){var e=[],f=d;return b.each(a,function(b,d){f=c(f,a[d]),e.push(f)}),e},keepIndexed:function(a,c){return b.filter(b.map(b.range(b.size(a)),function(b){return c(b,a[b])}),f)},reverseOrder:function(a){if("string"==typeof a)throw new TypeError("Strings cannot be reversed by _.reverseOrder");return c.call(a).reverse()},collate:function(a,c,d){if(!b.isArray(a))throw new TypeError("expected an array as the first argument");if(!b.isArray(c))throw new TypeError("expected an array as the second argument");return e.call(a,function(a,e){b.isFunction(d)?(valA=d.call(a),valB=d.call(e)):f(d)?(valA=a[d],valB=e[d]):(valA=a,valB=e);var g=b.indexOf(c,valA),h=b.indexOf(c,valB);return-1===g?1:-1===h?-1:g-h})}})}(this),function(a){var b=a._||require("lodash"),c=Array.prototype.slice,d=Array.prototype.concat,e=function(a){return null!=a},f=function(a){return a!==!1&&e(a)},g=function(a){return b.isArray(a)||b.isArguments(a)};b.mixin({second:function(a,b,d){return null==a?void 0:null==b||d?a[1]:c.call(a,1,b)},third:function(a,b,d){return null==a?void 0:null==b||d?a[2]:c.call(a,2,b)},nth:function(a,b,c){return null==b||c?void 0:a[b]},takeWhile:function(a,c){if(!g(a))throw new TypeError;for(var d=b.size(a),e=0;d>e&&f(c(a[e]));e++);return b.take(a,e)},dropWhile:function(a,c){if(!g(a))throw new TypeError;for(var d=b.size(a),e=0;d>e&&f(c(a[e]));e++);return b.drop(a,e)},splitWith:function(a,c){return[b.takeWhile(a,c),b.dropWhile(a,c)]},partitionBy:function(a,c){if(b.isEmpty(a)||!e(a))return[];var f=b.first(a),g=c(f),h=d.call([f],b.takeWhile(b.rest(a),function(a){return b.isEqual(g,c(a))}));return d.call([h],b.partitionBy(b.drop(a,b.size(h)),c))},best:function(a,c){return b.reduce(a,function(a,b){return c(a,b)?a:b})},keep:function(a,c){if(!g(a))throw new TypeError("expected an array as the first argument");return b.filter(b.map(a,function(a){return c(a)}),e)}})}(this),function(a){function b(a){return e.isElement(a)?a.children:a}function c(a,b,c,d,i,j){var k=[];return function l(a,m,n){if(e.isObject(a)){if(k.indexOf(a)>=0)throw new TypeError(h);k.push(a)}if(c){var o=c.call(i,a,m,n);if(o===g)return g;if(o===f)return}var p,q=b(a);if(e.isObject(q)&&!e.isEmpty(q)){j&&(p=e.isArray(a)?[]:{});var r=e.any(q,function(b,c){var d=l(b,c,a);return d===g?!0:void(p&&(p[c]=d))});if(r)return g}return d?d.call(i,a,m,n,p):void 0}(a)}function d(a,b,c){var d=[];return this.preorder(a,function(a,g){return c||g!=b?void(e.has(a,b)&&(d[d.length]=a[b])):f}),d}var e=a._||require("lodash"),f={},g={},h="Not a tree: same object found in two different branches",i={find:function(a,b,c){var d;return this.preorder(a,function(a,e,f){return b.call(c,a,e,f)?(d=a,g):void 0},c),d},filter:function(a,b,c,d){var e=[];return null==a?e:(b(a,function(a,b,f){c.call(d,a,b,f)&&e.push(a)},null,this._traversalStrategy),e)},reject:function(a,b,c,d){return this.filter(a,b,function(a,b,e){return!c.call(d,a,b,e)})},map:function(a,b,c,d){var e=[];return b(a,function(a,b,f){e[e.length]=c.call(d,a,b,f)},null,this._traversalStrategy),e},pluck:function(a,b){return d.call(this,a,b,!1)},pluckRec:function(a,b){return d.call(this,a,b,!0)},postorder:function(a,b,d,e){e=e||this._traversalStrategy,c(a,e,null,b,d)},preorder:function(a,b,d,e){e=e||this._traversalStrategy,c(a,e,b,null,d)},reduce:function(a,b,d,e){var f=function(a,c,e,f){return b(f||d,a,c,e)};return c(a,this._traversalStrategy,null,f,e,!0)}};i.collect=i.map,i.detect=i.find,i.select=i.filter,e.walk=function(a){var c=e.clone(i);return e.bindAll.apply(null,[c].concat(e.keys(c))),c._traversalStrategy=a||b,c},e.extend(e.walk,e.walk())}(this),function(a){function b(a){return function(){if(1===arguments.length)return a.apply(this,arguments);throw new RangeError("Only a single argument may be accepted.")}}var c=a._||require("lodash"),d=function(){function a(c,d,e,f,g,h){return h===!0?f.unshift(g):f.push(g),f.length==e?c.apply(d,f):b(function(){return a(c,d,e,f.slice(0),arguments[0],h)})}return function(c,d){var e=this;return b(function(){return a(c,e,c.length,[],arguments[0],d)})}}(),e=function(){var a=[];return function(b){if("function"!=typeof b)throw new Error("Argument 1 must be a function.");var c=b.length;return void 0===a[c]&&(a[c]=function(a){return function(){if(arguments.length!==c)throw new RangeError(c+" arguments must be applied.");return a.apply(this,arguments)}}),a[c](b)}}();c.mixin({fix:function(a){var b=c.rest(arguments),d=function(){for(var d=b.slice(),e=0,f=0;f<(d.length||e<arguments.length);f++)d[f]===c&&(d[f]=arguments[e++]);return a.apply(null,d)};return d._original=a,d},unary:function(a){return function(b){return a.call(this,b)}},binary:function(a){return function(b,c){return a.call(this,b,c)}},ternary:function(a){return function(b,c,d){return a.call(this,b,c,d)}},quaternary:function(a){return function(b,c,d,e){return a.call(this,b,c,d,e)}},curry:d,rCurry:function(a){return d.call(this,a,!0)},curry2:function(a){return b(function(c){return b(function(b){return a.call(this,c,b)})})},curry3:function(a){return b(function(c){return b(function(d){return b(function(b){return a.call(this,c,d,b)})})})},rcurry2:function(a){return b(function(c){return b(function(b){return a.call(this,b,c)})})},rcurry3:function(a){return b(function(c){return b(function(d){return b(function(b){return a.call(this,b,d,c)})})})},enforce:e}),c.arity=function(){var a={};return function b(c,d){if(null==a[c]){for(var e=new Array(c),f=0;c>f;++f)e[f]="__"+f;var g=e.join(),h="return function ("+g+") { return fun.apply(this, arguments); };";a[c]=new Function(["fun"],h)}return null==d?function(a){return b(c,a)}:a[c](d)}}()}(this),function(a){function b(a,b){return c.arity(a.length,function(){return a.apply(this,h.call(arguments,b))})}var c=a._||require("lodash"),d=function(a){return null!=a},e=function(a){return a!==!1&&d(a)},f=[].reverse,g=[].slice,h=[].map,i=function(a){return function(b,c){return 1===arguments.length?function(c){return a(b,c)}:a(b,c)}};c.mixin({always:c.constant,pipeline:function(){var a=c.isArray(arguments[0])?arguments[0]:arguments;return function(b){return c.reduce(a,function(a,b){return b(a)},b)}},conjoin:function(){var a=arguments;return function(b){return c.every(b,function(b){return c.every(a,function(a){return a(b)})})}},disjoin:function(){var a=arguments;return function(b){return c.some(b,function(b){return c.some(a,function(a){return a(b)})})}},comparator:function(a){return function(b,c){return e(a(b,c))?-1:e(a(c,b))?1:0}},complement:function(a){return function(){return!a.apply(this,arguments)}},splat:function(a){return function(b){return a.apply(this,b)}},unsplat:function(a){var b=a.length;return 1>b?a:1===b?function(){return a.call(this,g.call(arguments,0))}:function(){var c=arguments.length,d=g.call(arguments,0,b-1),e=Math.max(b-c-1,0),f=new Array(e),h=g.call(arguments,a.length-1);return a.apply(this,d.concat(f).concat([h]))}},unsplatl:function(a){var b=a.length;return 1>b?a:1===b?function(){return a.call(this,g.call(arguments,0))}:function(){var c=arguments.length,d=g.call(arguments,Math.max(c-b+1,0)),e=g.call(arguments,0,Math.max(c-b+1,0));return a.apply(this,[e].concat(d))}},mapArgs:i(b),juxt:function(){var a=arguments;return function(){var b=arguments;return c.map(a,function(a){return a.apply(this,b)},this)}},fnull:function(a){var b=c.rest(arguments);return function(){for(var e=c.toArray(arguments),f=c.size(b),g=0;f>g;g++)d(e[g])||(e[g]=b[g]);return a.apply(this,e)}},flip2:function(a){return function(){var b=g.call(arguments);return b[0]=arguments[1],b[1]=arguments[0],a.apply(this,b)}},flip:function(a){return function(){var b=f.call(arguments);return a.apply(this,b)}},functionalize:function(a){return function(b){return a.apply(b,c.rest(arguments))}},methodize:function(a){return function(){return a.apply(null,c.cons(this,arguments))}},k:c.always,t:c.pipeline}),c.unsplatr=c.unsplat,c.mapArgsWith=i(c.flip(b)),c.bound=function(a,b){var d=a[b];if(!c.isFunction(d))throw new TypeError("Expected property to be a function");return c.bind(d,a)}}(this),function(a){var b=a._||require("lodash"),c=Array.prototype.slice;b.mixin({attempt:function(a,d){if(null==a)return void 0;var e=a[d],f=c.call(arguments,2);return b.isFunction(e)?e.apply(a,f):void 0}})}(this),function(a){function b(a){return function(b){return a.call(this,b)}}function c(a,b,c){var d,e;for(d=void 0!==c?c:a(),e=a();null!=e;)d=b.call(e,d,e),e=a();return d}function d(a,b){var c=x;return function(){return c===x?c=a:null!=c&&(c=b.call(c,c)),c}}function e(a,b){var c,d,e=a;return function(){return null!=e?(c=b.call(e,e),d=c[1],e=null!=d?c[0]:void 0,d):void 0}}function f(a,b,c){var d=c;return function(){var c=a();return null==c?c:d=void 0===d?c:b.call(c,d,c)}}function g(a,b,c){var d,e,f=c;return function(){return e=a(),null==e?e:void 0===f?f=e:(d=b.call(e,f,e),f=d[0],d[1])}}function h(a,b){return function(){var c;return c=a(),null!=c?b.call(c,c):void 0}}function i(a,b){var c=null;return function(){var d,e;if(null==c){if(e=a(),null==e)return void(c=null);c=b.call(e,e)}for(;null==d;)if(d=c(),null==d){if(e=a(),null==e)return void(c=null);c=b.call(e,e)}return d}}function j(a,b){return function(){var c;for(c=a();null!=c;){if(b.call(c,c))return c;c=a()}return void 0}}function l(a,b){return j(a,function(a){return!b(a)})}function m(a,b){return j(a,b)()}function n(a,b,c){for(var d=0;b-->0;)a();return null!=c?function(){return++d<=c?a():void 0}:a}function o(a,b){return n(a,null==b?1:b)}function p(a,b){return n(a,0,null==b?1:b)}function q(a){var b=0;return function(){return a[b++]}}function r(a){var b,c,d;return b=0,d=[],c=function(){var e,f;return e=a[b++],e instanceof Array?(d.push({array:a,index:b}),a=e,b=0,c()):void 0===e?d.length>0?(f=d.pop(),a=f.array,b=f.index,c()):void 0:e}}function s(a){return function(){return a}}function t(a,b,c){return function(){var d;return a>b?void 0:(d=a,a+=c,d)}}function u(a,b,c){return function(){var d;return b>a?void 0:(d=a,a-=c,d)}}function v(a,b,c){return null==a?t(1,1/0,1):null==b?t(a,1/0,1):null==c?b>=a?t(a,b,1):u(a,b,1):c>0?t(a,b,c):0>c?u(a,b,Math.abs(c)):k(a)}var w=a._||require("lodash"),x={},y=b(v);w.iterators={accumulate:f,accumulateWithReturn:g,foldl:c,reduce:c,unfold:d,unfoldWithReturn:e,map:h,mapcat:i,select:j,reject:l,filter:j,find:m,slice:n,drop:o,take:p,List:q,Tree:r,constant:s,K:s,numbers:y,range:v}}(this,void 0),function(a){var b=a._||require("lodash");b.mixin({isInstanceOf:function(a,b){return a instanceof b},isAssociative:function(a){return b.isArray(a)||b.isObject(a)||b.isArguments(a)},isIndexed:function(a){return b.isArray(a)||b.isString(a)||b.isArguments(a)},isSequential:function(a){return b.isArray(a)||b.isArguments(a)},isZero:function(a){return 0===a},isEven:function(a){return b.isFinite(a)&&0===(1&a)},isOdd:function(a){return b.isFinite(a)&&!b.isEven(a)},isPositive:function(a){return a>0},isNegative:function(a){return 0>a},isValidDate:function(a){return b.isDate(a)&&!b.isNaN(a.getTime())},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},isInteger:function(a){return b.isNumeric(a)&&a%1===0},isFloat:function(a){return b.isNumeric(a)&&!b.isInteger(a)},isJSON:function(a){try{JSON.parse(a)}catch(b){return!1}return!0},isIncreasing:function(){var a=b.size(arguments);if(1===a)return!0;if(2===a)return arguments[0]<arguments[1];for(var c=1;a>c;c++)if(arguments[c-1]>=arguments[c])return!1;return!0},isDecreasing:function(){var a=b.size(arguments);if(1===a)return!0;if(2===a)return arguments[0]>arguments[1];for(var c=1;a>c;c++)if(arguments[c-1]<=arguments[c])return!1;return!0}})}(this),function(a){var b=a._||require("lodash"),c=(Array.prototype.slice,Array.prototype.concat),d=function(a){return null!=a},e=function(a){return a!==!1&&d(a)},f=function(a){return b.isArray(a)||b.isObject(a)},g=function(a){return function(b){return function(c){return a(c,b)}}};b.mixin({merge:function(){var a=b.some(arguments)?{}:null;return e(a)&&b.extend.apply(null,c.call([a],b.toArray(arguments))),a},renameKeys:function(a,e){return b.reduce(e,function(b,c,e){return d(a[e])?(b[c]=a[e],b):b},b.omit.apply(null,c.call([a],b.keys(e))))},snapshot:function(a){if(null==a||"object"!=typeof a)return a;var c=new a.constructor;for(var d in a)a.hasOwnProperty(d)&&(c[d]=b.snapshot(a[d]));return c},updatePath:function(a,c,e,g){if(!f(a))throw new TypeError("Attempted to update a non-associative object.");if(!d(e))return c(a);var h=b.isArray(e),i=h?e:[e],j=h?b.snapshot(a):b.clone(a),k=b.last(i),l=j;return b.each(b.initial(i),function(a){g&&!b.has(l,a)&&(l[a]=b.clone(g)),l=l[a]}),l[k]=c(l[k]),j},setPath:function(a,c,e,f){if(!d(e))throw new TypeError("Attempted to set a property at a null path.");return b.updatePath(a,function(){return c},e,f)},frequencies:g(b.countBy)(b.identity)})}(this),function(a){{var b=a._||require("lodash"),c=Array.prototype.concat,d=Array.prototype;d.slice}b.mixin({accessor:function(a){return function(b){return b&&b[a]}},dictionary:function(a){return function(b){return a&&b&&a[b]}},selectKeys:function(a,d){return b.pick.apply(null,c.call([a],d))},kv:function(a,c){return b.has(a,c)?[c,a[c]]:void 0},getPath:function e(a,c){return"string"==typeof c&&(c=c.split(".")),void 0===a?void 0:0===c.length?a:null===a?void 0:e(a[b.first(c)],b.rest(c))},hasPath:function f(a,c){"string"==typeof c&&(c=c.split("."));var d=c.length;return null==a&&d>0?!1:c[0]in a?1===d?!0:f(a[b.first(c)],b.rest(c)):!1},pickWhen:function(a,c){var d={};return b.each(a,function(b,e){c(a[e])&&(d[e]=a[e])}),d},omitWhen:function(a,c){return b.pickWhen(a,function(a){return!c(a)})}})}(this),function(a){var b=a._||require("lodash");b.mixin({exists:function(a){return null!=a},truthy:function(a){return a!==!1&&b.exists(a)},falsey:function(a){return!b.truthy(a)},not:function(a){return!a},firstExisting:function(){for(var a=0;a<arguments.length;a++)if(null!=arguments[a])return arguments[a]}})}(this),function(a){function b(a){return function(){return A.reduce(arguments,a)}}function c(a){return function(){for(var b,c=0;c<arguments.length-1;c++)if(b=a(arguments[c],arguments[c+1]),b===!1)return b;return b}}function d(a){return function(){return!a.apply(this,arguments)}}function e(a,b){return a+b}function f(a,b){return a-b}function g(a,b){return a*b}function h(a,b){return a/b}function i(a,b){return a%b}function j(a){return++a}function k(a){return--a}function l(a){return-a}function m(a,b){return a&b}function n(a,b){return a|b}function o(a,b){return a^b}function p(a,b){return a<<b}function q(a,b){return a>>b}function r(a,b){return a>>>b}function s(a){return~a}function t(a,b){return a==b}function u(a,b){return a===b}function v(a){return!a}function w(a,b){return a>b}function x(a,b){return b>a}function y(a,b){return a>=b}function z(a,b){return b>=a}var A=a._||require("lodash");A.mixin({add:b(e),sub:b(f),mul:b(g),div:b(h),mod:i,inc:j,dec:k,neg:l,eq:c(t),seq:c(u),neq:d(c(t)),sneq:d(c(u)),not:v,gt:c(w),lt:c(x),gte:c(y),lte:c(z),bitwiseAnd:b(m),bitwiseOr:b(n),bitwiseXor:b(o),bitwiseNot:s,bitwiseLeft:b(p),bitwiseRight:b(q),bitwiseZ:b(r)})}(this),function(a){var b=a._||require("lodash"),c=/\+/g,d=/(?:([^\[]+))|(?:\[(.*?)\])/g,e=function(a){return decodeURIComponent(a.replace(c,"%20"))},f=function(a,c,d){return b.isUndefined(d)&&(d=!0),b.isArray(c)?b.map(c,function(b,c){return f(d?c:a+"[]",b,!1)}).join("&"):b.isObject(c)?b.map(c,function(b,c){return f(d?c:a+"["+c+"]",b,!1)}).join("&"):encodeURIComponent(a)+"="+encodeURIComponent(c)};b.mixin({explode:function(a){return a.split("")},fromQuery:function(a){var c,f,g,h,i,j=a.split("&"),k={};return b.each(j,function(a){for(a=a.split("="),c=e(a[0]),g=c,i=k,d.lastIndex=0;null!==(f=d.exec(c));)b.isUndefined(f[1])?(h=f[2],i[g]=i[g]||(h?{}:[]),i=i[g]):h=f[1],g=h||b.size(i);i[g]=e(a[1])}),k},implode:function(a){return a.join("")},camelCase:function(a){return a.replace(/[-_\s](\w)/g,function(a){return a[1].toUpperCase()})},toDash:function(a){return a=a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()}),"-"==a.charAt(0)?a.substr(1):a},snakeCase:function(a){return a=a.replace(/([A-Z])/g,function(a){return"_"+a.toLowerCase()}),"_"==a.charAt(0)?a.substr(1):a},toQuery:function(a){return f("",a)},strContains:function(a,b){if("string"!=typeof a)throw new TypeError;return-1!=a.indexOf(b)},capitalize:function(a){return a.charAt(0).toUpperCase()+a.slice(1)},titleCase:function(a){return a.replace(/(\b.)/g,function(a){return a.toUpperCase()})},slugify:function(a){return a.replace(/ /g,"-").replace(/\./,"").toLowerCase()},regexEscape:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},humanize:function(a){return b.capitalize(a.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b([A-Z]+)([A-Z])([a-z])/,"$1 $2$3"))},stripTags:function(a){var b=a.replace(/<\/?[^<>]*>/gi,"");return b}})}(this),function(a){var b=a._||require("lodash");b.mixin({done:function(a){var c=b(a);return c.stopTrampoline=!0,c},trampoline:function(a){for(var c=a.apply(a,b.rest(arguments));b.isFunction(c)&&(c=c(),!(c instanceof b&&c.stopTrampoline)););return c.value()}})}(this);

@@ -1,2 +0,2 @@

module.exports = function(grunt) {
module.exports = function (grunt) {
grunt.loadNpmTasks("grunt-contrib-concat");

@@ -9,2 +9,3 @@ grunt.loadNpmTasks("grunt-contrib-uglify");

grunt.loadNpmTasks("grunt-tocdoc");
grunt.loadNpmTasks("grunt-mocha-test");

@@ -14,4 +15,3 @@ grunt.initConfig({

contribBanner:
"// <%= pkg.name %> v<%= pkg.version %>\n" +
contribBanner: "// <%= pkg.name %> v<%= pkg.version %>\n" +
"// =========================\n\n" +

@@ -38,2 +38,11 @@ "// > <%= pkg.homepage %>\n" +

mochaTest: {
test: {
src: ['test/mocha/*.*'],
options: {
reporter: "spec"
}
}
},
qunit: {

@@ -95,3 +104,3 @@ main: ['test/index.html'],

grunt.registerTask("test", ["jshint", "qunit:main"]);
grunt.registerTask("test", ["jshint", "qunit:main", "mochaTest"]);
grunt.registerTask("dist", ["concat", "uglify"]);

@@ -98,0 +107,0 @@ grunt.registerTask('default', ['test']);

{
"name": "lodash-contrib",
"description": "The brass buckles on lodash's utility belt",
"version": "241.4.7",
"version": "241.4.8",
"main": "index.js",

@@ -11,25 +11,23 @@ "dependencies": {

"grunt": "",
"grunt-cli": "",
"grunt-contrib-concat": "",
"grunt-contrib-jshint": "",
"grunt-contrib-qunit": "",
"grunt-contrib-uglify": "",
"grunt-contrib-qunit": "",
"grunt-contrib-watch": "",
"grunt-contrib-jshint": "",
"grunt-docco": "",
"grunt-tocdoc": "",
"grunt-cli": ""
"grunt-mocha-test": "",
"grunt-tocdoc": ""
},
"repository": "Empeeric/lodash-contrib",
"license": "MIT",
"author": {
"name": "Fogus",
"email": "me@fogus.me",
"url": "http://www.fogus.me"
},
"author": "Refael Ackermann <refael@empeeric.com> (http://www.empeeric.com)",
"contributors": [
"Refael Ackermann <refael@empeeric.com> (http://www.empeeric.com)",
"Fogus <me@fogus.me> (http://www.fogus.me)",
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)"
],
"scripts": {
"test": "grunt test"
"test": "grunt test",
"dist": "grunt dist"
}
}

@@ -20,3 +20,21 @@ var _ = require('../..');

});
describe("snake_case", function () {
it('can convert camelCase to a snake_case', function (done) {
assert.equal(_.snakeCase('AllTheYoungDudes'), 'all_the_young_dudes');
assert.equal(_.snakeCase('carryTheNews'), 'carry_the_news');
assert.equal(_.snakeCase('Boogaloo dudes'), 'boogaloo dudes');
done();
});
});
describe("Title Case", function () {
it('can convert a sentance to a Title Case', function (done) {
assert.equal(_.titleCase('Hey, dudes!'), 'Hey, Dudes!');
assert.equal(_.titleCase('(Where are you?)'), '(Where Are You?)');
assert.equal(_.titleCase('Boogaloo dudes (Stand up, come on!)'), 'Boogaloo Dudes (Stand Up, Come On!)');
done();
});
});
});
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