0.2.1 • Published 9 months ago

@karmaniverous/string-utilities v0.2.1

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
9 months ago

API DocumentationCHANGELOG

string-utilities

Handy tagged templates & other string utilities.

To install:

npm i @karmaniverous/string-utilities

Contents:

  • Types

  • Transformations

    • normstr - Normalize a string by converting diacriticals to base characters, removing non-word characters, and converting to lower case. Non-strings return undefined.
  • Tagged Template Functions

    • Non-stringifiable to Empty String (n2e) - Replaces expressions without toString property with empty strings.

    • Some Non-stringifiable to Empty String (sn2e) - Returns empty string when any expression has no toString property.

    • Some Non-stringifiable to Null (sn2n) - Returns null when any expression has no toString property.

    • Some Non-stringifiable to Undefined (sn2u) - Returns undefined when any expression has no toString property.

  • Higher-Order Functions

    • Non-stringifiable to Default (n2d) - Returns tagged template function that replaces any expression that has no toString property with a default value.

    • Some Non-stringifiable to Default (sn2d) - Returns tagged template function that returns a default value when any expression has no toString property.


Built for you with ❤️ on Bali! Find more great tools & templates on my GitHub Profile.

0.1.0

10 months ago

0.2.1

9 months ago

0.2.0

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago