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

humanize-string

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

humanize-string

Converts a camelized/dasherized/underscored string into a humanized one: fooBar-Baz_Faz → Foo bar baz faz

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
237K
decreased by-10.78%
Maintainers
1
Weekly downloads
 
Created

What is humanize-string?

The humanize-string npm package is used to convert a string to a human-readable format. It transforms strings with various delimiters (like dashes, underscores, or camelCase) into a more readable format with spaces and capitalized words.

What are humanize-string's main functionalities?

Basic String Humanization

This feature converts camelCase strings into a human-readable format with spaces and capitalized words.

const humanizeString = require('humanize-string');
console.log(humanizeString('helloWorld')); // 'Hello world'

Handling Strings with Dashes

This feature converts strings with dashes into a human-readable format with spaces and capitalized words.

const humanizeString = require('humanize-string');
console.log(humanizeString('hello-world')); // 'Hello world'

Handling Strings with Underscores

This feature converts strings with underscores into a human-readable format with spaces and capitalized words.

const humanizeString = require('humanize-string');
console.log(humanizeString('hello_world')); // 'Hello world'

Other packages similar to humanize-string

Keywords

FAQs

Package last updated on 24 Jan 2015

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