Skip to content

foss-dev/Slugit.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Event based slug generator. No need any framework or library. Written in VanillaJS

Usage

<input type="text" id="first">
<textarea id="second"></textarea>

Basic Usage

Import Slugit library and use like this

Params:

event: focusout, click, keyup, keydown, keypress

timeout: default (0)

el: Typed input field

target: When you finished typing, formatted output assign to this element
var slug = new Slugit()

slug.doSlug({
    event: 'focusout',
    timeout: 800,
    el: '#first',
    target: '#second',
})

Releases

No releases published

Packages

No packages published