# solid-links

> Transform URLs in strings to actual links.

Latest version **0.3.4** (published 2022-02-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install solid-links
pnpm add solid-links
yarn add solid-links
bun add solid-links
```

## 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.3.4 |
| Published | 2022-02-17 |
| First published | 2022-02-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 1 |
| Unpacked size | 29.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Prince Neil Cedrick Castro |
| Maintainers | princedev |
| Keywords | solidjs, linkify |

## Links

- npm: https://www.npmjs.com/package/solid-links
- Repository: https://github.com/git-ced/solid-links
- Homepage: https://solid-links.netlify.app/
- Issues: https://github.com/git-ced/solid-links/issues
- npm.io page: https://npm.io/package/solid-links

## Dependencies (1)

- [solid-js](https://npm.io/package/solid-js.md) ^1.3.7

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.3.4 (latest) — 2022-02-17
- 0.3.3 — 2022-02-17
- 0.3.2 — 2022-02-17
- 0.3.1 — 2022-02-17
- 0.3.0 — 2022-02-17
- 0.2.2 — 2022-02-17
- 0.2.1 — 2022-02-17
- 0.2.0 — 2022-02-17
- 0.1.5 — 2022-02-17
- 0.1.4 — 2022-02-17
- 0.1.3 — 2022-02-17
- 0.1.2 — 2022-02-17
- 0.1.1 — 2022-02-17
- 0.1.0 — 2022-02-17

## README

<p>
  <img 
    width="100%" 
    src="./banner.png" 
    alt="solid-links"
    style="border-radius: 0 0 50px 0;"
  >
</p>

Transform URLs in strings to actual links. It will find valid links in the given string and create `<a>` tags for it.

Internally, it uses this **[Regex](https://regexr.com/6fkup)** to identify links.

[![NPM](https://img.shields.io/npm/v/solid-links.svg)](https://www.npmjs.com/package/solid-links)
![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/solid-links)
![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/solid-links)
![Libraries.io dependency status for latest release, scoped npm package](https://img.shields.io/librariesio/release/npm/solid-links)
![NPM](https://img.shields.io/npm/l/solid-links)

## Table of Contents
 - [Installation](#installation)
 - [Setup](#setup)
 - [Usage](#usage)
 - [Authors](#authors)
 - [Changelog](#changelog)
 - [License](#license)

 <!-- toc -->
## Installation

This library is available through the [npm registry](https://www.npmjs.com/).

NPM
```bash
$ npm -i solid-links
```

Yarn
```bash
$ yarn add solid-links
```

## Setup

Start using it by importing the library first.

### CommonJS
```javascript
const Linkify = require('solid-links');
```

or 

### ES6
```javascript
import Linkify from 'solid-links';
```

## Usage

```javascript
import Linkify from 'solid-links';

const TEST_STRING = `
  Will match the following cases

      http://www.foufos.gr
      https://www.foufos.gr
      http://foufos.gr
      http://www.foufos.gr/kino
      http://werer.gr
      www.foufos.gr
      www.mp3.com
      www.t.co
      http://t.co
      http://www.t.co
      https://www.t.co
      www.aa.com
      http://aa.com
      http://www.aa.com
      https://www.aa.com

  Will NOT match the following

      www.foufos
      www.foufos-.gr
      www.-foufos.gr
      foufos.gr
      http://www.foufos
      http://foufos
      www.mp3#.com
`;

export default function Sample() {
  return (
    <Linkify
      text={TEST_STRING}
      style="text-decoration: underline; color: blue;"
    />
  );
}
```

## Authors

- [Prince Neil Cedrick Castro](https://github.com/git-ced/) - Initial work

See also the list of [contributors](https://github.com/git-ced/solid-links/contributors) who participated in this project.

## Changelog

[Changelog](https://github.com/git-ced/solid-links/releases)

## License

  [MIT](LICENSE)

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