1.0.0 ⢠Published 4 years ago
@alsolovyev/splitter v1.0.0
š¦ Splitter
JavaScript package to split an element by words or characters. Demo: alsolovyev.github.io/npm-packages/splitter
š Usage
Install with NPM:
npm install @alsolovyev/splitter --save
<h1 id='title'>ĀÆ\_(ć)_/ĀÆ</h1>
import split from '@alsolovyev/splitter'
split(document.getElementById('title'))
Through the script tag:
<h1 id='title'>ĀÆ\_(ć)_/ĀÆ</h1>
<script src="https://cdn.jsdelivr.net/npm/@alsolovyev/splitter@latest/dist/splitter.min.js"></script>
<!-- or -->
<script src="https://unpkg.com/@alsolovyev/splitter@latest/dist/splitter.min.js"></script>
split(document.getElementById('title'))
š Parameters
element
Type:
HTMLElement | Element
Required:true
An HTML element whose content needs to be splitted
by
Type:
'chars' | 'words'
Default:'chars'
Content split type
š§ Authors
š License
This project is licensed under the MIT License
1.0.0
4 years ago