Socket
Socket
Sign inDemoInstall

lowercase-keys

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    lowercase-keys

Lowercase the keys of an object


Version published
Weekly downloads
21M
decreased by-2.54%
Maintainers
1
Install size
3.77 kB
Created
Weekly downloads
 

Package description

What is lowercase-keys?

The lowercase-keys npm package is designed to convert the keys of an object to lowercase. It is a simple utility that can be particularly useful when dealing with data that may have inconsistent capitalization in its keys and you need to ensure uniformity for processing or matching purposes.

What are lowercase-keys's main functionalities?

Lowercase Object Keys

This feature allows you to convert all keys in an object to lowercase. It's particularly useful for normalizing data received from different sources that may not adhere to a consistent capitalization scheme.

{"const lowercaseKeys = require('lowercase-keys');\nconst myObj = {'Name': 'John', 'AGE': 30, 'Country': 'USA'};\nconst lowercasedObj = lowercaseKeys(myObj);\nconsole.log(lowercasedObj); // Output: { name: 'John', age: 30, country: 'USA' }"}

Other packages similar to lowercase-keys

Readme

Source

lowercase-keys Build Status

Lowercase the keys of an object

Install

$ npm install lowercase-keys

Usage

const lowercaseKeys = require('lowercase-keys');

lowercaseKeys({FOO: true, bAr: false});
//=> {foo: true, bar: false}

API

lowercaseKeys(object)

Returns a new object with the keys lowercased.

License

MIT © Sindre Sorhus

Keywords

FAQs

Last updated on 30 Apr 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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