Skip to content

v0.16.0 - Text Processing Utilities

Choose a tag to compare

@Zheruel Zheruel released this 22 Sep 20:01
· 35 commits to main since this release
bd28f2d

What's New

πŸŽ‰ New Functions (3)

extractEntities(text: string): ExtractedEntities

Extract various entities from text including:

  • πŸ“§ Email addresses
  • πŸ”— URLs
  • 🏷️ Social media mentions (@username)
  • #️⃣ Hashtags
  • πŸ“± Phone numbers
  • πŸ“… Dates (ISO, US, EU formats)
  • πŸ’΅ Prices

smartSplit(text: string): string[]

Intelligently split text into sentences with:

  • Abbreviation handling (Dr., Mr., Mrs., etc.)
  • Decimal number preservation ($10.50)
  • Ellipsis detection
  • Special case handling (U.S.A., M.I.T.)

humanizeList(items: unknown[], options?: HumanizeListOptions)

Convert arrays to human-readable lists:

  • Oxford comma support
  • Custom conjunctions (and/or)
  • Quote wrapping
  • Null/undefined filtering

πŸ“ˆ Changes

  • Bundle size limit increased from 6.5KB to 7.5KB
  • Total function count: 44
  • All functions maintain < 1.2KB individual size

πŸ“¦ Install

```bash
npm install nano-string-utils@0.16.0
```

πŸ“š Full Changelog

See CHANGELOG.md