Socket
Socket
Sign inDemoInstall

@agape/string

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agape/string

String and token manipulation


Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

@agape/string

String and token manipulation

Synopsis

import { 
    camelize,
    classify, 
    pluralize, 
    titalize, 
    tokenize, 
    verbalize 
} from '@agape/string'

camelize('foo bar')      // fooBar

classify('Foo bar')      // FooBar

pluralize('foo')         // foos

titalize('a foo a bar')  // A Foo a Bar

tokenize('Foo bar')      // foo-bar

verbalize('foo-bar')     // Foo bar

Description

Translate strings between different representations.

Functions

camelize

Convert to camel case.

classify

Remove all symbols and spaces, captialize words.

pluralize

Adds an 's' to most words. Words that end in 'y' are changed to 'ies', words that end in 'us' are changed to 'i'.

titalize

The first letter of each word is capitalized with the exception of a, an, and, at, be, but, by, for, if, in, of, on, the, to which are only capitalized if they are the first word in the string, otherwise they are converted to lowercase.

tokenize

Converted to lower case, word boundaries replaced with dashes.

verbalize

First character capitalized, word boundaries replaced with spaces.

Author

Maverik Minett maverik.minett@gmail.com

© 2020-2021 Maverik Minett

License

MIT

Keywords

FAQs

Package last updated on 21 Jan 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