Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 575 Bytes

Readme.MD

File metadata and controls

33 lines (22 loc) · 575 Bytes

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',
})