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

string-capitalizer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string-capitalizer

A simple library that takes a string and returns a capitalized string

  • 1.0.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
0
Weekly downloads
 
Created

String Capitalizer

String Capitalizer is a light weight library written in vanilla JavaScript (ES6) that simplifies string capitalization by offering mutiple string manipulation functions. At the moment the library consists of a single string manipulation method, it will expand to include more methods in later versions.

Capitalize string

capitalizeString() method capitalizes the first letter of a string and returns the capitalized string. If invalid string is inputted, 'invalid string'-error will be thrown.

Use instructions

Start by importing StringManipulator. Create a new instance of StringManipulator and invoke the method you wish to use.

import StringManipulator from 'string-capitalizer'

const stringManipulator = new StringManipulator(stringToManipulate)

const capitalizedString = stringManipulator.capitalizeString('hello world')

console.log(capitalizedString) // Hello world

Disclaimer

This library is still in development and is not yet ready for production use. Use at your own risk.

It is a practice project for learning purposes.

FAQs

Package last updated on 25 Sep 2024

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