All Projects → jonschlinkert → is-dotfile

jonschlinkert / is-dotfile

Licence: MIT license
Return true if the file is (or the file path has) a dotfile.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to is-dotfile

ExplorerGenie
ExplorerGenie is an extended context menu for the Windows explorer.
Stars: ✭ 25 (+92.31%)
Mutual labels:  filepath
is-symbol
Is this an ES6 Symbol value?
Stars: ✭ 16 (+23.08%)
Mutual labels:  is
dotfiles
My dotfiles based on Makefile
Stars: ✭ 150 (+1053.85%)
Mutual labels:  dotfile
is-valid-glob
Return true if a value is a valid glob pattern string, or array of glob patterns.
Stars: ✭ 21 (+61.54%)
Mutual labels:  filepath
dotfiles
Some items in /home/kiedtl/etc
Stars: ✭ 49 (+276.92%)
Mutual labels:  is
metrics
IS, FID score Pytorch and TF implementation, TF implementation is a wrapper of the official ones.
Stars: ✭ 91 (+600%)
Mutual labels:  is
Tmux Config
📗 Example tmux configuration - screen + vim key-bindings, system stat, cpu load bar.
Stars: ✭ 1,633 (+12461.54%)
Mutual labels:  dotfile
is-negative-zero
Is this value negative zero? === will lie to you.
Stars: ✭ 16 (+23.08%)
Mutual labels:  is
is-regex
Is this value a JS regex?
Stars: ✭ 22 (+69.23%)
Mutual labels:  is
custom zshrc
My personal dotfiles
Stars: ✭ 25 (+92.31%)
Mutual labels:  dotfile
is-relative
Returns `true` if a file path appears to be relative. Moved from the "relative" lib.
Stars: ✭ 13 (+0%)
Mutual labels:  filepath
is-primitive
Is the typeof value a javascript primitive?
Stars: ✭ 35 (+169.23%)
Mutual labels:  is
Toxiproxy
⏰ 🔥 A TCP proxy to simulate network and system conditions for chaos and resiliency testing
Stars: ✭ 7,529 (+57815.38%)
Mutual labels:  is
moonwalk
Walk the working directory towards the root recursively
Stars: ✭ 16 (+23.08%)
Mutual labels:  filepath
checkif.js
Javascript check library
Stars: ✭ 30 (+130.77%)
Mutual labels:  is
global-prefix
Get the npm global path prefix. Same code used internally by npm.
Stars: ✭ 27 (+107.69%)
Mutual labels:  filepath
is-arrow-function
Determine if a function is an ES6 arrow function or not.
Stars: ✭ 20 (+53.85%)
Mutual labels:  is
dotjitsu
My dot files collection - batteries included. Much awesome.
Stars: ✭ 16 (+23.08%)
Mutual labels:  dotfile
nvim
Structure, documented, super fast neovim configuration. 可能是翻斗花园最好用的 neovim 配置[^1]。
Stars: ✭ 223 (+1615.38%)
Mutual labels:  dotfile
pathvalidate
A Python library to sanitize/validate a string such as filenames/file-paths/etc.
Stars: ✭ 139 (+969.23%)
Mutual labels:  filepath

is-dotfile NPM version NPM monthly downloads NPM total downloads Linux Build Status

Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory.

Install

Install with npm:

$ npm install --save is-dotfile

Usage

To be considered a dotfile, it must be the last filename in the path, like .gitignore. Otherwise it's a dot directory, like .git/ and .github/.

var isDotfile = require('is-dotfile');

false

All of the following return false:

isDotfile('a/b/c.js');
isDotfile('/.git/foo');
isDotfile('a/b/c/.git/foo');
//=> false

true

All of the following return true:

isDotfile('a/b/.gitignore');
isDotfile('.gitignore');
isDotfile('/.gitignore');
//=> true

About

Related projects

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Contributors

Commits Contributor
13 jonschlinkert
1 Lykathia

Building docs

(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)

To generate the readme, run the following command:

$ npm install -g verbose/verb#dev verb-generate-readme && verb

Running tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test

Author

Jon Schlinkert

License

Copyright © 2017, Jon Schlinkert. Released under the MIT License.


This file was generated by verb-generate-readme, v0.6.0, on May 30, 2017.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].