# is-changelog-path

> Check if a given value is a `string` that looks like a CHANGELOG file path

Latest version **2.0.0** (published 2018-08-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install is-changelog-path
pnpm add is-changelog-path
yarn add is-changelog-path
bun add is-changelog-path
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2018-08-11 |
| First published | 2015-11-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Shinnosuke Watanabe |
| Maintainers | shinnn |
| Keywords | check, if, boolean, filename, name, path, changelog, change-log, updates, releases, release-history, history, releasenote, match |

## Links

- npm: https://www.npmjs.com/package/is-changelog-path
- Repository: https://github.com/shinnn/is-changelog-path
- Homepage: https://github.com/shinnn/is-changelog-path#readme
- Issues: https://github.com/shinnn/is-changelog-path/issues
- npm.io page: https://npm.io/package/is-changelog-path

## Dependencies (1)

- [changelog-filename-regex](https://npm.io/package/changelog-filename-regex.md) ^2.0.1

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2018-08-11
- 2.0.0-1 — 2018-07-26
- 1.1.1 — 2018-07-20
- 1.1.0 — 2015-11-30
- 1.0.0 — 2015-11-18

## README

# is-changelog-path

[![npm version](https://img.shields.io/npm/v/is-changelog-path.svg)](https://www.npmjs.com/package/is-changelog-path)
[![Build Status](https://travis-ci.org/shinnn/is-changelog-path.svg?branch=master)](https://travis-ci.org/shinnn/is-changelog-path)
[![Build status](https://ci.appveyor.com/api/projects/status/0idgfgivh7rn7jnr/branch/master?svg=true)](https://ci.appveyor.com/project/ShinnosukeWatanabe/is-changelog-path/branch/master)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/is-changelog-path.svg)](https://coveralls.io/github/shinnn/is-changelog-path)

Check if a given value is a `string` that looks like a CHANGELOG file path

```javascript
const isChangelogPath = require('is-changelog-path');

// Relative paths

isChangelogPath('CHANGELOG.txt'); //=> true
isChangelogPath('lib/index.js'); //=> false

// Absolute paths

isChangelogPath('/Users/shinnn/docs/history.md'); //=> true
isChangelogPath('/Applications/Google Chrome.app'); //=> false
```

## Installation

[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/getting-started/what-is-npm).

```
npm install is-changelog-path
```

## API

```javascript
const isChangelogPath = require('is-changelog-path');
```

### isChangelogPath(*filePath*)

*filePath*: `any`  
Return: `boolean`

It returns `true` if it takes a `string` whose [last path portion](https://nodejs.org/api/path.html#path_path_basename_path_ext) matches [changelog-filename-regex](https://github.com/shinnn/changelog-filename-regex), otherwise `false`.

```javascript
const isChangelogPath = require('is-changelog-path');

isChangelogPath('release-note.md'); //=> true
isChangelogPath('/Users/shinnn/release-note.md'); //=> true

isChangelogPath('release/-note.md'); //=> false
isChangelogPath('release-note.md.js'); //=> false
isChangelogPath('release-note.md/'); //=> false
isChangelogPath('release-note.md\\'); //=> false

isChangelogPath(new Set(['not', 'a', 'string'])); //=> false
```

## License

[ISC License](./LICENSE) © 2018 Shinnosuke Watanabe

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