sindresorhus / has-flagLinks
Check if argv has a specific flag
☆94Updated 4 years ago
Alternatives and similar repositories for has-flag
Users that are interested in has-flag are comparing it to the libraries listed below
Sorting:
- Check if your code is running as an npm or yarn script☆64Updated 2 months ago
- Check if your package was installed globally☆69Updated 2 years ago
- Check if a string matches the name of a Node.js builtin module☆61Updated 8 months ago
- Check if a path is a file, directory, or symlink☆79Updated last year
- Slice a string with ANSI escape codes☆50Updated 2 months ago
- Indent each line in a string☆113Updated 3 years ago
- Get the first path that exists on disk of multiple paths☆61Updated 2 months ago
- Exit the process when the `esc` key is pressed☆57Updated last year
- Get the directory of globally installed packages and binaries☆76Updated 2 years ago
- Get the path of the parent module☆78Updated 2 months ago
- Detect the dominant newline character of a string☆56Updated 2 years ago
- A better `Promise.race()`☆50Updated 2 years ago
- Regular expression for matching issue references☆49Updated last year
- Convert a file path to a file URL: `unicorn.jpg` → `file:///Users/sindresorhus/unicorn.jpg`☆62Updated last year
- Import a module like with `require()` but from a given path☆85Updated 3 years ago
- Copy a file☆121Updated 3 months ago
- Strip redundant indentation and indent the string☆54Updated 4 years ago
- Create a lazily evaluated value☆69Updated 4 years ago
- Wordwrap a string with ANSI escape codes☆130Updated 2 months ago
- Create an array with values that are present in the first input array but not additional ones☆40Updated 4 years ago
- Get metadata on the default editor or a specific editor☆54Updated 2 months ago
- Check if a string is a valid filename☆62Updated 4 years ago
- Check when the DOM has loaded like `DOMContentLoaded`☆111Updated last year
- Lazy number range generator☆82Updated last year
- Get your PATH prepended with locally installed binaries☆105Updated last year
- Filter object keys and values into a new object☆104Updated last year
- Randomize the order of items in an array☆108Updated 2 months ago
- Get an unused filename by appending a number if it exists: `file.txt` → `file (1).txt`☆143Updated 2 months ago
- Check if something is a Node.js stream☆114Updated last year
- Invert the key/value of an object. Example: {foo: 'bar'} → {bar: 'foo'}☆37Updated 3 years ago