JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 87775
  • Score
    100M100P100Q201318F
  • License MIT

Check if a string is a valid filename

Package Exports

  • valid-filename

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (valid-filename) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

valid-filename Build Status

Check if a string is a valid filename

Install

$ npm install valid-filename

Usage

const validFilename = require('valid-filename');

validFilename('foo/bar');
//=> false

validFilename('foo-bar');
//=> true

API

validFilename(input)

Returns a boolean of whether input is a valid filename.

input

Type: string

The string to check.

  • filenamify - Convert a string to a valid safe filename

License

MIT © Sindre Sorhus