# slugo

> The smallest possible slug utility for Node.js and Browser

Latest version **0.4.0** (published 2021-10-04) · MIT license · 0 weekly downloads

## Install

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

## Health

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

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2021-10-04 |
| First published | 2017-04-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 63 |
| Author | egoist |
| Maintainers | egoist, rem |

## Links

- npm: https://www.npmjs.com/package/slugo
- Repository: https://github.com/egoist/slugo
- Homepage: https://github.com/egoist/slugo#readme
- Issues: https://github.com/egoist/slugo/issues
- npm.io page: https://npm.io/package/slugo

## Recent versions

- 0.4.0 (latest) — 2021-10-04
- 0.3.1 — 2019-09-12
- 0.3.0 — 2019-09-12
- 0.2.3 — 2018-10-04
- 0.2.2 — 2018-09-11
- 0.2.1 — 2017-04-18
- 0.2.0 — 2017-04-18
- 0.1.0 — 2017-04-18

## README

# slugo

[![NPM version](https://img.shields.io/npm/v/slugo.svg?style=flat)](https://npmjs.com/package/slugo) [![NPM downloads](https://img.shields.io/npm/dm/slugo.svg?style=flat)](https://npmjs.com/package/slugo) [![CircleCI](https://circleci.com/gh/egoist/slugo/tree/master.svg?style=shield)](https://circleci.com/gh/egoist/slugo/tree/master)  [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/egoist/donate)

There're many npm packages that slugify string for you, some support unicode and some others even support CJK character. But I would never include a library which weights 2MB in browser. So that's the purpose of this library which only does basic transformation, eg: remove html tags / special chars / convert space to hyphen, and does not touch non-ascii chars. This is similar to the way GitHub handles the headings in README.

And the size of this library is about 700B minified and 400B gzipped.

## Install

```bash
yarn add slugo
```

CDN: https://unpkg.com/slugo/dist/

## Usage

```js
const slugo = require('slugo')

slugo('hello world, <strong>my kitten!</strong>')
//=> hello-world-my-kitten
```

You can also access `window.slugo` if you're using the CDN version.

## Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D


## Author

**slugo** © [egoist](https://github.com/egoist), Released under the [MIT](./LICENSE) License.<br>
Authored and maintained by egoist with help from contributors ([list](https://github.com/egoist/slugo/contributors)).

> [egoist.moe](https://egoist.moe) · GitHub [@egoist](https://github.com/egoist) · Twitter [@_egoistlily](https://twitter.com/_egoistlily)

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