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

@supercharge/strings

Package Overview
Dependencies
Maintainers
3
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@supercharge/strings

String utilities for Node.js and JavaScript

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source


Strings

String utilities for Node.js.


Installation · Docs · Usage



Latest Version Monthly downloads

Follow @marcuspoehls and @superchargejs for updates!


Introduction

The @supercharge/strings package provides chainable string utilities for Node.js and JavaScript. It’s a wrapper around JavaScript’s global String class providing a handful of useful methods, like .title(), .strip(), .camel(), and so on.

Installation

npm i @supercharge/strings

Docs

Find all the details for @supercharge/strings in the extensive Supercharge docs.

Usage

Using @supercharge/strings is pretty straightforward. Pass a string to the imported Function and chain your desired methods to transform to string value to your needs.

For example, you may want to trim a string and then title-case it:

const Str = require('@supercharge/strings')

const title = Str('  Supercharge is sweet!').trim().title().get()

// title: "Supercharge Is Sweet!"

For every method in the chain that would return a string, the package returns an instance of iteself. This way, you can chain further methods. Call .get() to retrieve the actual JavaScript string.

Contributing

Do you miss a string function? We very much appreciate your contribution! Please send in a pull request 😊

  1. Create a fork
  2. Create your feature branch: git checkout -b my-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request 🚀

License

MIT © Supercharge


superchargejs.com  ·  GitHub @supercharge  ·  Twitter @superchargejs

Keywords

FAQs

Package last updated on 28 Dec 2022

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