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

@taimoorsiddiq/cap-it

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@taimoorsiddiq/cap-it

cap-it is a lightweight and user-friendly utility for string capitalization. It allows developers to effortlessly capitalize first letter of any string, ensuring clean and professional formatting in their applications.

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
50
decreased by-88.1%
Maintainers
0
Weekly downloads
 
Created
Source

@taimoorsiddiq/cap-it

A lightweight utility for string capitalization.
Effortlessly capitalize the first letter of any string, ensuring clean, professional formatting in your JavaScript applications.

npm version
License: MIT
Downloads


**Why Use @taimoorsiddiq/cap-it?

  • 🟢 Simple and Lightweight: A small, focused utility with no dependencies.
  • 🟢 Effortless Integration: Easy to use in any JavaScript or Node.js application.
  • 🟢 Improved Readability: Ensures proper formatting for strings in your app.
  • 🟢 Versatile Applications: Perfect for text transformation in web, server-side, or CLI applications.

Installation

To use @taimoorsiddiq/cap-it in your project, install it via npm:

npm install @taimoorsiddiq/cap-it

Usage

Using @taimoorsiddiq/cap-it is straightforward. Here's how:

// Import the package
const capitalize = require("@taimoorsiddiq/cap-it");

// Example 1: Capitalize a single string
console.log(capitalize("hello world")); // Output: "Hello world"

// Example 2: Handle empty or invalid inputs
console.log(capitalize(""));            // Output: ""
console.log(capitalize(null));          // Output: ""

API

The package provides a single function:

capitalize(inputString)

  • Parameters:

    • inputString (string): The string to be capitalized.
  • Returns:

    • (string): The input string with the first letter capitalized. Returns an empty string if the input is invalid.

Features

  • Capitalizes the first letter of any string.
  • Handles edge cases like empty or non-string inputs gracefully.
  • Lightweight and dependency-free.

Use Cases

  • 📝 Capitalizing user input for cleaner display.
  • 🛠️ Transforming text for headings or labels.
  • 🌐 Formatting strings for web or server-side applications.

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a feature branch:
    git checkout -b feature/your-feature
    
  3. Commit your changes and push to the branch:
    git commit -m "Add your message here"
    git push origin feature/your-feature
    
  4. Submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Keywords

  • string capitalization
  • capitalize string
  • capitalize first letter
  • string utilities
  • text transformation
  • JavaScript text tools
  • string formatting utility
  • lightweight utility
  • capitalize library


Author

👤 Taimoor Siddiq
For queries, feel free to email me or raise an issue on GitHub.

Keywords

FAQs

Package last updated on 24 Nov 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

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