filenamify-url
    Overview
    Documentation
    Insights
    Code
    Contributors
    Dependencies
    Alternatives

filenamify-url

Convert a URL to a valid filename

2.1.0  •  Updated 10 months ago  •  by Sindre Sorhus  •  MIT License

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(input, [options])

Accepts a URL and returns a valid filename.

input

Type: string

A URL to convert to a valid filename.

options

Type: Object

See the filenamify options.

License

MIT © Sindre Sorhus

How often do you use dark themes on other websites?

Popularity

Weekly Downloads
98.0K
Stars
27

Maintenance

Development

Last ver 10 months ago
Created 5 years ago
Last commit 10 months ago
6 months between commits

Technology

Node version: 10.15.1
3.9K unpacked

Compliance

MIT License
OSI Approved
0 vulnerabilities

Contributors

2 contributors
Sindre Sorhus
Maintainer, 8 commits, 2 merges
Dimitri Benin
2 commits, 2 PRs
Arthur Verschaeve
Maintainer
Vsevolod Strukchinsky
Maintainer
Works at Yandex
Kevin Mårtensson
Maintainer
Works at imagemin yeoman
Sam Verschueren
Maintainer

Tags

filename
file
name
string
path
convert
valid
url
uri
Ready for the next level?
Join Openbase's founding team to help us build the ultimate open-source app store, work with the latest technologies, and enjoy great culture, impact and autonomy
Openbase helps developers choose among and use millions of open-source packages, so they can build amazing products faster.
© 2020 Devstore, Inc.