# is-hidden

> Check if `basename` is hidden (starts with a dot)

Latest version **2.0.1** (published 2022-11-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-hidden
pnpm add is-hidden
yarn add is-hidden
bun add is-hidden
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2022-11-12 |
| First published | 2015-08-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Titus Wormer |
| Maintainers | wooorm |
| Keywords | file, is, hidden, dot, full, stop |

## Links

- npm: https://www.npmjs.com/package/is-hidden
- Repository: https://github.com/wooorm/is-hidden
- Homepage: https://github.com/wooorm/is-hidden#readme
- Issues: https://github.com/wooorm/is-hidden/issues
- Funding: https://github.com/sponsors/wooorm
- npm.io page: https://npm.io/package/is-hidden

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2022-11-12
- 2.0.0 — 2021-03-11
- 1.1.3 — 2020-01-25
- 1.1.2 — 2019-05-12
- 1.1.1 — 2017-07-27
- 1.1.0 — 2016-11-07
- 1.0.1 — 2015-08-26
- 1.0.0 — 2015-08-26

## README

# is-hidden

[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]

Tiny package that checks if a basename (`.gitignore`, `example.js`) is
hidden (starts with a dot).

## Contents

*   [What is this?](#what-is-this)
*   [When should I use this?](#when-should-i-use-this)
*   [Install](#install)
*   [Use](#use)
*   [API](#api)
    *   [`isHidden(basename)`](#ishiddenbasename)
*   [Types](#types)
*   [Compatibility](#compatibility)
*   [Contribute](#contribute)
*   [Security](#security)
*   [License](#license)

## What is this?

Tiny package that checks if a basename is hidden.

## When should I use this?

Probably not, you can do check this yourself.
I was doing this so many times that I made it a package years ago.

## Install

This package is [ESM only][esm].
In Node.js (version 14.14+, 16.0+), install with [npm][]:

```sh
npm install is-hidden
```

In Deno with [`esm.sh`][esmsh]:

```js
import {isHidden} from 'https://esm.sh/is-hidden@2'
```

In browsers with [`esm.sh`][esmsh]:

```html
<script type="module">
  import {isHidden} from 'https://esm.sh/is-hidden@2?bundle'
</script>
```

## Use

```js
import {isHidden} from 'is-hidden'

isHidden('.git') // => true
isHidden('readme.md') // => false
```

## API

This package exports the identifier `isHidden`.
There is no default export.

### `isHidden(basename)`

Check if `basename` is hidden (starts with a dot).

## Types

This package is fully typed with [TypeScript][].
It exports no additional types.

## Compatibility

This package is at least compatible with all maintained versions of Node.js.
As of now, that is Node.js 14.14+ and 16.0+.
It also works in Deno and modern browsers.

## Contribute

Yes please!
See [How to Contribute to Open Source][contribute].

## Security

This package is safe.

## License

[MIT][license] © [Titus Wormer][author]

<!-- Definitions -->

[build-badge]: https://github.com/wooorm/is-hidden/workflows/main/badge.svg

[build]: https://github.com/wooorm/is-hidden/actions

[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/is-hidden.svg

[coverage]: https://codecov.io/github/wooorm/is-hidden

[downloads-badge]: https://img.shields.io/npm/dm/is-hidden.svg

[downloads]: https://www.npmjs.com/package/is-hidden

[size-badge]: https://img.shields.io/bundlephobia/minzip/is-hidden.svg

[size]: https://bundlephobia.com/result?p=is-hidden

[npm]: https://docs.npmjs.com/cli/install

[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

[esmsh]: https://esm.sh

[typescript]: https://www.typescriptlang.org

[contribute]: https://opensource.guide/how-to-contribute/

[license]: license

[author]: https://wooorm.com

---
_Source: https://npm.io/package/is-hidden · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
