Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wessberg/stringutil

A collection of helper functions for working with strings that I frequently use
https://github.com/wessberg/stringutil

ascii capitalize dash-case dashcase kebabcase pascalcase string util

Last synced: 3 days ago
JSON representation

A collection of helper functions for working with strings that I frequently use

Awesome Lists containing this project

README

        

> A collection of helper functions for working with strings

Downloads per month
NPM version
Dependencies
Contributors
code style: prettier
License: MIT
Support on Patreon

## Description

This library is a simple collection of helper functions for working with strings.

### Features

- Various helpers for changing and checking casing
- Helpers for changing and checking quoting

## Table of Contents

- [Description](#description)
- [Features](#features)
- [Table of Contents](#table-of-contents)
- [Install](#install)
- [NPM](#npm)
- [Yarn](#yarn)
- [Usage](#usage)
- [Contributing](#contributing)
- [Maintainers](#maintainers)
- [Backers](#backers)
- [Patreon](#patreon)
- [License](#license)

## Install

### NPM

```
$ npm install @wessberg/stringutil
```

### Yarn

```
$ yarn add @wessberg/stringutil
```

## Usage

```typescript
import {camelCase, allIndexesOf} from "@wessberg/stringutil";
camelCase("my-string"); // returns 'myString'
camelCase("my string"); // returns 'myString'
camelCase("MY_STRING"); // returns 'myString'
camelCase("my-complex_string HAS a_SPACE"); // returns 'myComplexStringHasASpace'
allIndexesOf(/_/g, "my string has underscores _here_"); // returns [26, 31]
```

## Contributing

Do you want to contribute? Awesome! Please follow [these recommendations](./CONTRIBUTING.md).

## Maintainers

| Frederik Wessberg |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Frederik Wessberg](mailto:[email protected])
Twitter: [@FredWessberg](https://twitter.com/FredWessberg)
Github: [@wessberg](https://github.com/wessberg)
_Lead Developer_ |

## Backers

### Patreon

[Become a backer](https://www.patreon.com/bePatron?u=11315442) and get your name, avatar, and Twitter handle listed here.

Backers on Patreon

## License

MIT © [Frederik Wessberg](mailto:[email protected]) ([@FredWessberg](https://twitter.com/FredWessberg)) ([Website](https://github.com/wessberg))