New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@slynova/slug

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@slynova/slug

Transforms any text into an uri-safe string.

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-slug

Transforms any text into an uri-safe string.


Getting Started

This package is available in the Node Package Repository and can be easily installed with npm or yarn.

$ npm i @slynova/slug
# or
$ yarn add @slynova/slug

Then require the slug() method directly from the package.

const slug = require('@slynova/slug')

slug('1 < 2') // 1-less-2
slug('Hey! How are you') // hey-how-are-you
slug('tôi tên là đức tạ') // toi-ten-la-duc-ta
slug('learn adonis in 30minutes') // learn-adonis-in-30-minutes

Extending char map

To extend the char map you can use the static method extends

const slug = require('@slynova/slug')

slug.extends({'💙': 'love'})
slug('i 💙 you') // i-love-you

Contribution Guidelines

Any pull requests or discussions are welcome.
Note that every pull request providing a new feature or correcting a bug should be created with appropriate unit tests.

FAQs

Package last updated on 17 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc