Socket
Socket
Sign inDemoInstall

filenamify-url

Package Overview
Dependencies
7
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    filenamify-url

Convert a URL to a valid filename


Version published
Weekly downloads
83K
decreased by-7.18%
Maintainers
1
Install size
50.9 kB
Created
Weekly downloads
 

Readme

Source

filenamify-url

Convert a URL to a valid filename

Install

npm install filenamify-url

Usage

import filenamifyUrl from 'filenamify-url';

filenamifyUrl('http://sindresorhus.com/foo?bar=baz');
//=> 'sindresorhus.com!foo!bar=baz'

filenamifyUrl('http://sindresorhus.com/foo', {replacement: '🐴'});
//=> 'sindresorhus.com🐴foo'

filenamifyUrl(new URL('http://sindresorhus.com'));
//=> 'sindresorhus.com'

API

filenamifyUrl(url, options?)

Accepts a URL and returns a valid filename.

url

Type: string | URL

A URL to convert to a valid filename.

options

Type: object

See the filenamify options.

Keywords

FAQs

Last updated on 01 Dec 2023

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