Socket
Socket
Sign inDemoInstall

uppercase-keys-object

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.2 to 1.1.3

2

package.json
{
"name": "uppercase-keys-object",
"version": "1.1.2",
"version": "1.1.3",
"description": "Uppercase the keys of an object",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -26,15 +26,33 @@ # uppercase-keys-object

const employee = {
ID: 127,
FIRST_Name: 'Huynh',
last_NAME: 'Ha',
salary: 1500
const object = {
camelCase: 1,
UPPERCASE: 2,
lowercase: 3,
snake_case: 4,
PascalCase: 5,
'Title Case': 6,
'dot.case': 7,
'param-case': 8,
'Sentence case': 9,
'path/case': 10,
'Header-Case': 11
};
const res = upperKeys(employee);
const res = upperKeys(object);
console.log(res);
/**
{ CAMELCASE: 1,
UPPERCASE: 2,
LOWERCASE: 3,
SNAKE_CASE: 4,
PASCALCASE: 5,
'TITLE CASE': 6,
'DOT.CASE': 7,
'PARAM-CASE': 8,
'SENTENCE CASE': 9,
'PATH/CASE': 10,
'HEADER-CASE': 11 }
*/
// { ID: 127, FIRST_NAME: 'Huynh', LAST_NAME: 'Ha', SALARY: 1500 }
console.log(upperKeys(null)); // null

@@ -58,10 +76,18 @@ console.log(upperKeys(undefined)); // null

<script>
const employee = {
ID: 127,
FIRST_Name: 'Huynh',
last_NAME: 'Ha',
salary: 1500
const object = {
camelCase: 1,
UPPERCASE: 2,
lowercase: 3,
snake_case: 4,
PascalCase: 5,
'Title Case': 6,
'dot.case': 7,
'param-case': 8,
'Sentence case': 9,
'path/case': 10,
'Header-Case': 11
};
const res = upperKeys(employee);
const res = upperKeys(object);

@@ -71,2 +97,3 @@ console.log(res);

console.log(upperKeys(undefined)); // null
</script>

@@ -85,2 +112,3 @@ ```

+ [camelcase-keys-object](https://github.com/huynhsamha/camelcase-keys-object)
+ [snakecase-keys-object](https://github.com/huynhsamha/snakecase-keys-object)

@@ -87,0 +115,0 @@

const upperKeys = require('./../index');
const employee = {
ID: 127,
FIRST_Name: 'Huynh',
last_NAME: 'Ha',
salary: 1500
const object = {
camelCase: 1,
UPPERCASE: 2,
lowercase: 3,
snake_case: 4,
PascalCase: 5,
'Title Case': 6,
'dot.case': 7,
'param-case': 8,
'Sentence case': 9,
'path/case': 10,
'Header-Case': 11
};
const res = upperKeys(employee);
const res = upperKeys(object);
console.log(res);
console.log(upperKeys(null));
console.log(upperKeys(undefined));
/**
{ CAMELCASE: 1,
UPPERCASE: 2,
LOWERCASE: 3,
SNAKE_CASE: 4,
PASCALCASE: 5,
'TITLE CASE': 6,
'DOT.CASE': 7,
'PARAM-CASE': 8,
'SENTENCE CASE': 9,
'PATH/CASE': 10,
'HEADER-CASE': 11 }
*/
console.log(upperKeys(null)); // null
console.log(upperKeys(undefined)); // null

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc