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

underscore-plus

Package Overview
Dependencies
Maintainers
4
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

underscore-plus - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

25

lib/underscore-plus.js

@@ -90,2 +90,3 @@ (function() {

deepClone: function(object) {
var _this = this;
if (_.isArray(object)) {

@@ -96,7 +97,5 @@ return object.map(function(value) {

} else if (_.isObject(object)) {
return plus.mapObject(object, (function(_this) {
return function(key, value) {
return [key, plus.deepClone(value)];
};
})(this));
return plus.mapObject(object, function(key, value) {
return [key, plus.deepClone(value)];
});
} else {

@@ -297,6 +296,9 @@ return object;

}
result = string.replace(/([A-Z])|(_)/g, function(m, letter, underscore) {
result = string.replace(/([A-Z])|_+/g, function(match, letter) {
if (letter == null) {
letter = '';
}
return " " + letter;
});
return plus.capitalize(result);
return plus.capitalize(result.trim());
},

@@ -315,8 +317,7 @@ undasherize: function(string) {

string = string[0].toLowerCase() + string.slice(1);
return string.replace(/([A-Z])|(-)/g, function(m, letter, dash) {
if (letter) {
return "_" + letter.toLowerCase();
} else {
return "_";
return string.replace(/([A-Z])|-+/g, function(match, letter) {
if (letter == null) {
letter = '';
}
return "_" + (letter.toLowerCase());
});

@@ -323,0 +324,0 @@ },

{
"name": "underscore-plus",
"version": "1.0.5",
"version": "1.0.6",
"description": "Underscore plus additional utilities",

@@ -5,0 +5,0 @@ "licenses": [

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