transform-string
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

transform-string Build Status

Transform any string using properties CSS like

Install

$ npm install transform-string

Usage

const transformString = ('transform-string');

transformString('unicorns');
//=> 'Unicorns'

transformString.capitalize('hello world');
//=> 'Hello World'

or

import transformString, { capitalize } from 'transform-string';

transformString('unicorns');
//=> 'Unicorns'

capitalize('hello world');
//=> 'Hello World'

API

transformString(input, [options])

input

Type: string

The input to be transformed

options

Type: object

type

Type: string
Default: title

String transform type.

Types:

  • title
  • capitalize
  • lowercase
  • uppercase

title(input)

input

Type: string

Capitalizes first letter of string

capitalize(input)

input

Type: string

Capitalizes first letter of each word in string

lowercase(input)

input

Type: string

Converts all to lowercase

uppercase(input)

input

Type: string

Converts all to uppercase

Related

License

MIT © Abraham Hernandez

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i transform-string

    Weekly Downloads

    3

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    6.05 kB

    Total Files

    5

    Last publish

    Collaborators

    • abranhe