# convert2slug

> Create an url path from titles,names which contain special characters.

Latest version **1.0.1** (published 2024-02-16) · ISC license · 0 weekly downloads

## Install

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

## 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.0.1 |
| Published | 2024-02-16 |
| First published | 2024-02-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Şamil Algül |
| Maintainers | samilalgul |
| Keywords | url, creator, slug, creator, create, slug, slug, from, word, slug, from, title |

## Links

- npm: https://www.npmjs.com/package/convert2slug
- Repository: https://github.com/samilalgul/slug-creator
- Homepage: https://github.com/samilalgul/slug-creator#readme
- Issues: https://github.com/samilalgul/slug-creator/issues
- npm.io page: https://npm.io/package/convert2slug

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2024-02-16
- 1.0.0 — 2024-02-16

## README

# Convert2Slug

**Convert2Slug** is a lightweight npm package that enables you to create URL-friendly slugs from string content effortlessly. It takes a string input and converts it into a slug format suitable for URLs.

## Installation

You can install Convert2Slug via npm:

```bash
npm install convert2slug
```

## Usage

```javascript
import createSlug from "convert2slug";

const originalString = 'Place To show Google AdSense';
const slug = createSlug(originalString);

console.log(slug); // Output: place-to-show-google-adsense
```

## Features

- Generates URL-friendly slugs from string content
- Handles special characters and non-ASCII characters intelligently
- Easy to integrate into your projects with ES6 import syntax

## API

### createSlug(inputString)

- **inputString**: The original string that you want to convert into a slug.

Returns: A slugified version of the input string.

## Examples

```javascript
import createSlug from "convert2slug";

console.log(createSlug('Hello World')); // Output: hello-world
console.log(createSlug('This is a Test')); // Output: this-is-a-test
console.log(createSlug('Special Characters: !@#$%^&*()')); // Output: special-characters
```

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