constant-case
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -1,2 +0,3 @@ | ||
var snake = require('snake-case'); | ||
var upperCase = require('upper-case'); | ||
var snakeCase = require('snake-case'); | ||
@@ -7,6 +8,7 @@ /** | ||
* @param {String} string | ||
* @param {String} [locale] | ||
* @return {String} | ||
*/ | ||
module.exports = function (string) { | ||
return snake(string).toUpperCase(); | ||
module.exports = function (string, locale) { | ||
return upperCase(snakeCase(string, locale), locale); | ||
}; |
{ | ||
"name": "constant-case", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Constant case a string", | ||
"main": "constant-case.js", | ||
"files": [ | ||
"constant-case.js", | ||
"LICENSE" | ||
], | ||
"scripts": { | ||
@@ -30,7 +34,9 @@ "test": "istanbul cover _mocha -- -R spec" | ||
"istanbul": "^0.3.0", | ||
"mocha": "^1.18.2" | ||
"mocha": "^1.18.2", | ||
"pre-commit": "0.0.9" | ||
}, | ||
"dependencies": { | ||
"snake-case": "^1.0.0" | ||
"snake-case": "^1.1.0", | ||
"upper-case": "^1.1.1" | ||
} | ||
} |
@@ -6,6 +6,7 @@ # Constant Case | ||
[![Test coverage][coveralls-image]][coveralls-url] | ||
[![Gittip][gittip-image]][gittip-url] | ||
Constant case a string. | ||
Supports Unicode (non-ASCII characters) and non-string entities, such as objects with a `toString` property, numbers and booleans. Empty values (`null` and `undefined`) will result in an empty string. | ||
## Installation | ||
@@ -24,2 +25,4 @@ | ||
constantCase('PascalCase'); //=> "PASCAL_CASE" | ||
constantCase('myString', 'tr'); //=> "MY_STRİNG" | ||
``` | ||
@@ -37,3 +40,1 @@ | ||
[coveralls-url]: https://coveralls.io/r/blakeembrey/constant-case?branch=master | ||
[gittip-image]: https://img.shields.io/gittip/blakeembrey.svg?style=flat | ||
[gittip-url]: https://www.gittip.com/blakeembrey |
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
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
38
3394
2
3
4
12
+ Addedupper-case@^1.1.1
+ Addedupper-case@1.1.3(transitive)
Updatedsnake-case@^1.1.0