Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

filenamify-url

2.1.1 • Public • Published

filenamify-url Build Status

Convert a URL to a valid filename

Install

$ npm install filenamify-url

Usage

const filenamifyUrl = require('filenamify-url');
 
filenamifyUrl('http://sindresorhus.com/foo?bar=baz');
//=> 'sindresorhus.com!foo!bar=baz'
 
filenamifyUrl('http://sindresorhus.com/foo', {replacement: '🐴'});
//=> 'sindresorhus.com🐴foo'

API

filenamifyUrl(url, options?)

Accepts a URL and returns a valid filename.

url

Type: string

A URL to convert to a valid filename.

options

Type: object

See the filenamify options.

Install

npm i filenamify-url

DownloadsWeekly Downloads

248,778

Version

2.1.1

License

MIT

Unpacked Size

3.91 kB

Total Files

5

Last publish

Collaborators

  • avatar