// package
is-dotfile
type: "module"
// preferences
// replacements (1)
snippet::is-dotfile
Simple or drop-in replacementThis package is no longer necessary. You can test whether a path ends in a dotfile such as `.gitignore` using a regular expression.
// example
const isDotfile = (str) =>
/(?:\/|^)\.[^/.][^/]*$/.test(str);