<!-- markdownlint-disable first-line-h1 -->

<h1 align="center">Welcome to slice-html 👋</h1>
<p>
  <a href="https://www.npmjs.com/package/slice-html" target="_blank">
    <img alt="Version" src="https://img.shields.io/npm/v/slice-html.svg">
  </a>
  <a href="https://github.com/hata6502/slice-html/blob/main/LICENSE" target="_blank">
    <img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" />
  </a>
  <a href="https://twitter.com/hata6502" target="_blank">
    <img alt="Twitter: hata6502" src="https://img.shields.io/twitter/follow/hata6502.svg?style=social" />
  </a>
</p>

> Slice an HTML element by the text offset.

### ✨ [Demo](https://hata6502.github.io/slice-html/)

![demo](https://user-images.githubusercontent.com/7702653/106356332-3601a180-6342-11eb-8438-ea5aee3b5f9f.png)

## Install

### Install via yarn

```sh
yarn add slice-html
```

### Load from CDN

```html
<script src="https://cdn.jsdelivr.net/npm/slice-html@latest"></script>
```

## Usage

Please see [demo HTML](https://github.com/hata6502/slice-html/blob/main/docs/index.html).
`sliceHTML()` is similar to [String.prototype.slice()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice).

## Build

```sh
yarn webpack
```

## Format

```sh
yarn fix
```

## Run tests

```sh
yarn test
```

## Author

<img alt="Tomoyuki Hata" src="https://avatars.githubusercontent.com/hata6502" width="48" /> **Tomoyuki Hata <hato6502@gmail.com>**

## 🤝 Contributing

Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/hata6502/slice-html/issues).

## Show your support

Give a ⭐️ if this project helped you!

## Disclaimer

Please see [DISCLAIMER.md](https://github.com/hata6502/slice-html/blob/main/DISCLAIMER.md).

---

_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_
