Skip to content

RogerBetter/filenamify-url

 
 

Repository files navigation

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'

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.

About

Convert a URL to a valid filename

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 81.3%
  • TypeScript 18.7%