New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

to-case

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

to-case - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

component.json

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "1.0.0",
"version": "1.0.1",
"description": "Simple case detection and conversion for strings.",

@@ -8,0 +8,0 @@ "keywords": [

1.0.1 - May 27, 2015
--------------------
* fix `inverse` case, with tests
1.0.0 - March 9, 2014

@@ -3,0 +7,0 @@ ---------------------

@@ -106,9 +106,10 @@

exports.inverse = function (string) {
for (var i = 0, char; char = string[i]; i++) {
var chars = string.split('');
for (var i = 0, char; char = chars[i]; i++) {
if (!/[a-z]/i.test(char)) continue;
var upper = char.toUpperCase();
var lower = char.toLowerCase();
string[i] = char == upper ? lower : upper;
chars[i] = char == upper ? lower : upper;
}
return string;
return chars.join('');
};

@@ -115,0 +116,0 @@

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "1.0.0",
"version": "1.0.1",
"description": "Simple case conversion and detection for strings.",

@@ -8,0 +8,0 @@ "keywords": [

@@ -50,2 +50,8 @@ describe('case', function () {

describe('#inverse', function () {
it('should invert case', function () {
assert('tHIS iS A sTRING' == kase.inverse('This Is a String'));
});
});
});
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