# ustring

> String utility functions

Latest version **1.4.1** (published 2014-09-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install ustring
pnpm add ustring
yarn add ustring
bun add ustring
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.1 |
| Published | 2014-09-26 |
| First published | 2014-07-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Radu Brehar |
| Maintainers | radubrehar |
| Keywords | string, utils, toupperfirst, utility |

## Links

- npm: https://www.npmjs.com/package/ustring
- Repository: https://github.com/radubrehar/ustring
- Issues: https://github.com/radubrehar/ustring/issues
- npm.io page: https://npm.io/package/ustring

## Dependencies (2)

- [i-s](https://npm.io/package/i-s.md) ~1.x.x
- [functionally](https://npm.io/package/functionally.md) ~0.x.x

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.4.1 (latest) — 2014-09-26
- 1.4.0 — 2014-09-22
- 1.3.2 — 2014-09-02
- 1.3.1 — 2014-09-02
- 1.3.0 — 2014-08-21
- 1.2.1 — 2014-08-18
- 1.2.0 — 2014-08-18
- 1.1.1 — 2014-08-05
- 1.1.0 — 2014-07-22
- 1.0.1 — 2014-07-22
- 1.0.0 — 2014-07-22

## README

# String utility methods

## Installation

```npm install ustring```

## API

```js
var ustring = require('ustring')
```

### toLowerFirst

```js
ustring.toLowerFirst('ABC') == 'aBC'
```

### toUpperFirstFirst

```js
ustring.toUpperFirst('abc') == 'Abc'
```

### hyphenate

```js
ustring.hyphenate('ThisIsMyWord') == 'this-is-my-word'
```

### humanize

```js
ustring.humanize('This_is-a-very-long-sentence') == 'This is a very long sentence'
```

### camelize

```js
ustring.camelize('This-is-a-very-long-word') == 'ThisIsAVeryLongWord'
```

### endsWith

```js
ustring.endsWith('hello world','world') == true
ustring.endsWith('hello world','wor') == false
ustring.endsWith(123, 3) == true
```

### is.alphanum

```js
ustring.is.alphanum('abcd09') == true
ustring.is.alphanum('abcd09#%#$') == false
```

### is.match

```js
ustring.is.match(/^[a-zA-Z0-9]+$/, 'abcd09') == true
ustring.is.match(/^[a-zA-Z0-9]+$/, 'abcd09#%#$') == false
```

Since match is a curried fn, you can even write

```js
var matches = ustring.is.match(/^[a-zA-Z0-9]+$/)
matches('abc')
```
<!--
### is.email

```js
ustring.is.email('me@test.com') == true
ustring.is.email('myemail.com') == false
```
 -->

### Tests

```
make
```

### License

MIT

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