Comparing version 3.0.0 to 3.0.1
@@ -0,1 +1,9 @@ | ||
3.0.1 / 2015-03-16 | ||
------------------ | ||
* bugfix `underscore()` for single letter "words" [#131](https://github.com/jprichardson/string.js/pull/131) | ||
```js | ||
S('oneAtATime').underscore().s //'one_at_a_time' instead of 'one_at_atime' | ||
``` | ||
3.0.0 / 2014-12-08 | ||
@@ -2,0 +10,0 @@ ------------------ |
@@ -8,3 +8,3 @@ /* | ||
var VERSION = '3.0.0'; | ||
var VERSION = '3.0.1'; | ||
@@ -125,11 +125,3 @@ var ENTITIES = {}; | ||
count: function(ss) { | ||
var count = 0 | ||
, pos = this.s.indexOf(ss) | ||
while (pos >= 0) { | ||
count += 1 | ||
pos = this.s.indexOf(ss, pos + 1) | ||
} | ||
return count | ||
return require('./_count')(this.s, ss) | ||
}, | ||
@@ -571,3 +563,3 @@ | ||
underscore: function() { | ||
var s = this.trim().s.replace(/([a-z\d])([A-Z]+)/g, '$1_$2').replace(/[-\s]+/g, '_').toLowerCase(); | ||
var s = this.trim().s.replace(/([a-z\d])([A-Z]+)/g, '$1_$2').replace(/([A-Z\d]+)([A-Z][a-z])/,'$1_$2').replace(/[-\s]+/g, '_').toLowerCase(); | ||
return new this.constructor(s); | ||
@@ -574,0 +566,0 @@ }, |
{ | ||
"name": "string", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "string contains methods that aren't included in the vanilla JavaScript string such as escaping html, decoding html entities, stripping tags, etc.", | ||
@@ -5,0 +5,0 @@ "homepage": "http://stringjs.com", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17
98450
939
1