Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/humps

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/humps

TypeScript definitions for humps

  • 2.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
75K
decreased by-55.04%
Maintainers
1
Weekly downloads
 
Created

What is @types/humps?

@types/humps is a TypeScript type definition package for the humps library, which provides utilities for converting object keys between camelCase, snake_case, and other formats. This is particularly useful for working with APIs that use different naming conventions.

What are @types/humps's main functionalities?

camelizeKeys

Converts the keys of an object from snake_case to camelCase.

const humps = require('humps');
const input = { first_name: 'John', last_name: 'Doe' };
const output = humps.camelizeKeys(input);
console.log(output); // { firstName: 'John', lastName: 'Doe' }

decamelizeKeys

Converts the keys of an object from camelCase to snake_case.

const humps = require('humps');
const input = { firstName: 'John', lastName: 'Doe' };
const output = humps.decamelizeKeys(input);
console.log(output); // { first_name: 'John', last_name: 'Doe' }

camelize

Converts a string from snake_case to camelCase.

const humps = require('humps');
const input = 'hello_world';
const output = humps.camelize(input);
console.log(output); // 'helloWorld'

decamelize

Converts a string from camelCase to snake_case.

const humps = require('humps');
const input = 'helloWorld';
const output = humps.decamelize(input);
console.log(output); // 'hello_world'

Other packages similar to @types/humps

FAQs

Package last updated on 16 Sep 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc