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.0.0 to 1.1.0

9

index.js

@@ -1,4 +0,5 @@

'use strict';
function upperKeys(obj) {
module.exports = (obj) => {
if (!obj) return null;
const res = {};

@@ -10,1 +11,5 @@ for (let key in obj) {

}
if (typeof module !== 'undefined' && module.exports) {
module.exports = upperKeys;
}
{
"name": "uppercase-keys-object",
"version": "1.0.0",
"version": "1.1.0",
"description": "Uppercase the keys of an object",

@@ -26,3 +26,5 @@ "main": "index.js",

"keys",
"key"
"key",
"browser",
"browserify"
],

@@ -29,0 +31,0 @@ "author": {

# uppercase-keys-object
Uppercase the keys of an object. It is useful for oracledb.
Uppercase the keys of an object. Use for node and browser
It is useful for [oracledb](https://github.com/oracle/node-oracledb).

@@ -16,2 +17,4 @@ ## Installation

#### Node.JS
```js

@@ -32,4 +35,34 @@ const upperKeys = require('uppercase-keys-object');

// { ID: 127, FIRST_NAME: 'Huynh', LAST_NAME: 'Ha', SALARY: 1500 }
console.log(lowerKeys(null)); // null
console.log(lowerKeys(undefined)); // null
```
#### Browser
##### 1. NPM Package
```html
<script src="./node_modules/uppercase-keys-object/index.js"></script>
```
##### 2. Download from source
```html
<script src="path/to/uppercase-keys-object"></script>
```
##### Usage
```html
<script>
const employee = {
ID: 127,
FIRST_Name: 'Huynh',
last_NAME: 'Ha',
salary: 1500
};
const res = upperKeys(employee);
console.log(res);
console.log(upperKeys(null)); // null
console.log(upperKeys(undefined)); // null
</script>
```
## API

@@ -43,2 +76,2 @@

## Related
[lowercase-keys-object]()
[uppercase-keys-object](https://github.com/huynhsamha/uppercase-keys-object)

@@ -13,1 +13,3 @@ const upperKeys = require('./index');

console.log(res);
console.log(lowerKeys(null));
console.log(lowerKeys(undefined));
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