# string-transform

> String-transform module from Glize library.

Latest version **21.9.21** (published 2026-10-03) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install string-transform
pnpm add string-transform
yarn add string-transform
bun add string-transform
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 21.9.21 |
| Published | 2026-10-03 |
| First published | 2021-09-12 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 20.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Valentin Podkamennyi |
| Maintainers | vpodk, lizapodk |
| Keywords | string-transform, text-transform, capitalize, camel case, camelCase, pascal case, PascalCase, kebab case, kebab-case, snake case, snake_case, glize |

## Links

- npm: https://www.npmjs.com/package/string-transform
- Repository: https://github.com/Datamart/string-transform
- Homepage: https://glize.js.org
- Issues: https://github.com/Datamart/string-transform/issues
- npm.io page: https://npm.io/package/string-transform

## Dependencies (1)

- [uint](https://npm.io/package/uint.md) latest

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 21.9.21 (latest) — 2026-10-03
- 21.9.20 — 2026-10-03
- 21.9.19 — 2021-09-14
- 21.9.18 — 2021-09-14
- 21.9.17 — 2021-09-14
- 21.9.16 — 2021-09-14
- 21.9.15 — 2021-09-13
- 21.9.14 — 2021-09-13
- 21.9.13 — 2021-09-13
- 21.9.12 — 2021-09-12

## README

# String Transform [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=String%20transform%20module%20from%20Glize%20library.&url=https://glize.js.org&via=GitHub&hashtags=Glize,JavaScript,ECMAScript,ES6)
[![Build Status](https://github.com/Datamart/string-transform/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/Datamart/string-transform/actions/workflows/npm-publish.yml) [![License](https://img.shields.io/:license-apache-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) [![NPM version](https://img.shields.io/npm/v/string-transform.svg?style=flat)](https://npmjs.org/package/string-transform) [![Website](https://img.shields.io/website-up-down-green-red/https/glize.js.org.svg?style=flat)](https://glize.js.org) [![NPM downloads](https://img.shields.io/npm/dm/string-transform.svg?style=flat)](https://npmjs.org/package/string-transform)

String transform module from Glize library.

## Usage

```bash
npm install string-transform --save
```

```js
import {
  capitalize,
  hash,
  toCamelCase,
  toKebabCase,
  toPascalCase,
  toSnakeCase,
} from 'string-transform';

/**
 * Transforms the first character of each word to uppercase; other
 * characters are unaffected.
 * @param {string} str The string to be transformed.
 * @return {string} Returns a transformed string.
 */
console.log(capitalize('test string')); // Test String

/**
 * Converts <code>str</code> to hashed string.
 * @param {string} str The input string.
 * @return {string} Returns hashed string.
 */
console.log(hash('https://glize.js.org/')); // 4Q69R

/**
 * Converts the passed string into a string with the separator denoted by the 
 * next word capitalized (aka lower camel case).
 * @param {string} str The input string.
 * @return {string} A string transformed into a string with the separator 
 * denoted by the next word capitalized.
 * @see https://en.wikipedia.org/wiki/Camel_case
 */
console.log(toCamelCase('to-camel-case')); // toCamelCase

/**
 * Converts the passed string into a string of capitalized words without 
 * separators (aka upper camel case).
 * @param {string} str The input string.
 * @return {string} A string transformed into a string of capitalized words 
 * without separators.
 * @see https://en.wikipedia.org/wiki/PascalCase
 */
console.log(toPascalCase('to-pascal-case')); // ToPascalCase

/**
 * Converts the given string into a string with a single underscore as a separator.
 * @param {string} str The input string.
 * @return {string} A transformed string.
 * @see https://en.wikipedia.org/wiki/Snake_case
 */
console.log(toSnakeCase('toSnakeCase')); // to_snake_case

/**
 * Converts the given string into a string with a single dash as a separator.
 * @param {string} str The input string.
 * @return {string} A transformed string.
 */
console.log(toKebabCase('toKebabCase')); // to-kebab-case
```

For more information please visit [Glize project page](https://glize.js.org).

---
_Source: https://npm.io/package/string-transform · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
