JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q42399F
  • License MIT

A set of utilities to modify strings

Package Exports

  • @zerodep/string
  • @zerodep/string/cjs.js
  • @zerodep/string/esm.js
  • @zerodep/string/umd.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@zerodep/string) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@zerodep/string

min gzip tree shaking language types

Code Quality LGTM Grade Maintainability

coverage last commit vulnerabilities

A set of string manipulation functions.

This is a barrel package of all @zerodep/string.* utility packages within the @zerodep monorepo.

tl;dr

A short explanation / quick reference:

import { stringLowerFirst, stringUpperFirst, stringWords } from '@zerodep/string';

stringLowerFirst('STRING'); // "sTRING"
stringUpperFirst('string'); // "String"
stringWords('Some Words'); // ["Some", "Words"]

Table of Contents

Install

npm install @zerodep/string

Of course, you may use yarn, pnpm, or the package manager of your choice. Only npm examples are shown for brevity.

This package may also be found on both jsDelivr and unpkg in UMD, ESM and CJS formats.

Included Packages

This barrel package includes all @zerodep/string.* packages:

Method Name Package Purpose Package Size
stringDeburr string.deburr Utility to convert accented to non-accented characters min
    gzip
stringLowerFirst string.lowerfirst Utility to convert the first character of a string to lowercase min
    gzip
stringUpperFirst string.upperfirst Utility to convert the first character of a string to uppercase min
    gzip
stringTitleCase string.titlecase Utility to capitalize the first letter of each word in a string min
    gzip
stringWords string.words Utility to convert a string to an array of words min
    gzip

Advantages of @zerodep Packages

We help make source code more readable, more secure, faster to craft, less likely to have hidden defects, and easier to maintain.

  • Zero npm dependencies - completely eliminates all risk of supply-chain attacks, decreases node_modules folder size
  • Fully typed - typescript definitions are provided for every package for a better developer experience
  • Semantically named - package and method names are easy to grok, remember, use, and read
  • Documented - actually useful documentation with examples and helpful tips
  • Intelligently Packaged - multiple npm packages of different sizes available allowing a menu or a-la-carte composition of capabilities
  • 100% Tested - all methods and packages are fully unit tested
  • ESM & CJS - has both ecmascript modules and common javascript exports, both are fully tree-shakable
  • CDN Available - available on fast content delivery networks in UMD, CJS and ESM formats
  • FP Inspired - gently opinionated to encourage functional programming style for cleaner and more maintainable software
  • Predictably Versioned - semantically versioned for peace-of-mind upgrading, this includes changelogs
  • MIT Licensed - permissively licensed for maximum usability

Support

All @zerodep packages are built for the ES2020 specification. Should you need to support older environments you will need to add appropriate polyfills. All packages are tested on the following platforms/browsers:

Browsers

  • Chrome - last 2 major versions
  • Firefox - last 2 major versions
  • Safari - last 2 major versions
  • Edge - last 2 major versions
  • Android - last 2 major versions
  • iOS - last 2 major versions

Node

  • v16.x - Gallium LTS
  • v14.x - Fermium LTS

It is likely the package will work on other technologies and version, however development and testing effort is only spent on the above.

Semver

All @zerodep packages, including this one, adhere to Semantic Versioning practices:

  • major versions: correlates with breaking changes to one or more method signatures
  • minor versions: includes addition of new functionality or backwards-compatible software improvements
  • patch versions: are reserved for copy changes, documentation enhancements and bug fixes

The above said, a security best practice is to pin your software packages to specific versions and only upgrade to more recent releases after careful inspection of any CHANGELOG, release notes and all software changes.

Resources

License

MIT