Socket
Socket
Sign inDemoInstall

slugify-url

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    slugify-url

Maps urls to simplified strings usable as filenames


Version published
Maintainers
1
Install size
5.47 kB
Created

Readme

Source

Converts urls to simplified strings

Build Status

Synopsis

slugify-url maps urls to a sanitized string that can be used as a filename and serves as a good mnemonic of the original url even though it is not reversible

#Description

  • It skips the protocol and user/password if provided part from the URL (http:// or https:// or ://:@ )
  • It maps slashes to !
  • It truncates the URL to 100 chars
  • It includes an optional options argument that allows the user to override the behavior
    • slashchar char used to replace slashes - default !
    • maxlength default 100
    • skipprotocol default true
    • skipuserpass default true

For example

Installation

npm install slugify-url

Keywords

FAQs

Last updated on 29 Jul 2013

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc