0.6.1 • Published 2 months ago

@acusti/textual v0.6.1

Weekly downloads
-
License
Unlicense
Repository
github
Last release
2 months ago

@acusti/textual

latest version maintenance status bundle size downloads per month

Utilities for transforming and formatting text (i.e. strings).

Usage

npm install @acusti/textual
# or
yarn add @acusti/textual

Import the utilities by name. The package only has named exports, making it maximally tree-shakeable:

import { capitalize, getInitials } from '@acusti/textual';

The exported utilities are:

capitalize(text: string)

returns input text with equivalent formatting to the text-transform: capitalize; CSS property

getInitials(text: string)

returns uppercase initials from the input string, e.g. getInitials('franklin delano Roosevelt') // => 'FDR'

getNameFromEmail(email: string)

returns a formatted name from an email address, treating . and + as space separators, e.g. getNameFromEmail('franklin.delano+roosevelt@gmail.com') // => 'Franklin Delano Roosevelt'

0.6.1

2 months ago

0.6.0

2 months ago

0.5.0

4 months ago

0.4.1

4 months ago

0.4.0

5 months ago

0.3.0

1 year ago

0.2.0

2 years ago

0.1.0

3 years ago