autocapitalize
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -0,1 +1,5 @@ | ||
1.0.2 - November, 23 2018 | ||
* 649f93f Fix: toLowercase instead use original string (#2) (Lukas Aichbauer) | ||
1.0.1 - November, 23 2018 | ||
@@ -2,0 +6,0 @@ |
@@ -20,3 +20,3 @@ "use strict"; | ||
var returnValue = ''; | ||
value.toLowerCase().split(/([.?!] )/g).forEach(function (item) { | ||
value.split(/([.?!] )/g).forEach(function (item) { | ||
returnValue += item ? "".concat(item[0].toUpperCase()).concat(item.substring(1)) : ''; | ||
@@ -32,3 +32,3 @@ }); | ||
var _returnValue = ''; | ||
value.toLowerCase().split(/([ -])/g).forEach(function (item) { | ||
value.split(/([ -])/g).forEach(function (item) { | ||
_returnValue += item ? "".concat(item[0].toUpperCase()).concat(item.substring(1)) : ''; | ||
@@ -35,0 +35,0 @@ }); |
{ | ||
"name": "autocapitalize", | ||
"description": "A small string manipulation library to capitalize letters based on rules", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"main": "./lib/index.js", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
8319