title-case
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "title-case", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Title case a string", | ||
@@ -11,3 +11,6 @@ "main": "title-case.js", | ||
"scripts": { | ||
"test": "istanbul cover _mocha -- -R spec" | ||
"lint": "standard", | ||
"test-std": "mocha -- -R spec --bail", | ||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- -R spec --bail", | ||
"test": "npm run lint && npm run test-cov" | ||
}, | ||
@@ -34,4 +37,5 @@ "repository": { | ||
"istanbul": "^0.3.0", | ||
"mocha": "^1.18.2", | ||
"pre-commit": "0.0.9" | ||
"mocha": "^2.2.1", | ||
"pre-commit": "^1.0.6", | ||
"standard": "^3.3.0" | ||
}, | ||
@@ -38,0 +42,0 @@ "dependencies": { |
# Title Case | ||
[![NPM version][npm-image]][npm-url] | ||
[![NPM downloads][downloads-image]][downloads-url] | ||
[![Build status][travis-image]][travis-url] | ||
@@ -13,3 +14,3 @@ [![Test coverage][coveralls-image]][coveralls-url] | ||
```bash | ||
``` | ||
npm install title-case --save | ||
@@ -23,6 +24,6 @@ ``` | ||
titleCase('string'); //=> "String" | ||
titleCase('PascalCase'); //=> "Pascal Case" | ||
titleCase('string') //=> "String" | ||
titleCase('PascalCase') //=> "Pascal Case" | ||
titleCase('STRING', 'tr'); //=> "Strıng" | ||
titleCase('STRING', 'tr') //=> "Strıng" | ||
``` | ||
@@ -36,2 +37,4 @@ | ||
[npm-url]: https://npmjs.org/package/title-case | ||
[downloads-image]: https://img.shields.io/npm/dm/title-case.svg?style=flat | ||
[downloads-url]: https://npmjs.org/package/title-case | ||
[travis-image]: https://img.shields.io/travis/blakeembrey/title-case.svg?style=flat | ||
@@ -38,0 +41,0 @@ [travis-url]: https://travis-ci.org/blakeembrey/title-case |
@@ -1,3 +0,3 @@ | ||
var upperCase = require('upper-case'); | ||
var sentenceCase = require('sentence-case'); | ||
var upperCase = require('upper-case') | ||
var sentenceCase = require('sentence-case') | ||
@@ -13,4 +13,4 @@ /** | ||
return sentenceCase(str, locale).replace(/^.| ./g, function (m) { | ||
return upperCase(m, locale); | ||
}); | ||
}; | ||
return upperCase(m, locale) | ||
}) | ||
} |
3708
41
4