How to use slugo - 1 common examples

To help you get started, we’ve selected a few slugo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github egoist / md / src / renderer.js View on Github external
heading(text, level, raw) {
    let slug = slugo(raw)
    const count = this._headings.filter(h => h === raw).length
    if (count > 0) {
      slug += `-${count}`
    }
    this._headings.push(raw)
    return `${text}\n`
  }

slugo

The smallest possible slug utility for Node.js and Browser

MIT
Latest version published 3 years ago

Package Health Score

49 / 100
Full package analysis

Popular slugo functions