$ cnpm install filenamify-url
Convert a URL to a valid filename
$ npm install filenamify-url
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'
Accepts a URL and returns a valid filename.
Type: string
A URL to convert to a valid filename.
Type: object
See the filenamify
options.
Copyright 2013 - present © cnpmjs.org