# is-inner-link

> Returns true if a link targets a directory inside its parent directory

Latest version **5.0.0** (published 2026-03-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-inner-link
pnpm add is-inner-link
yarn add is-inner-link
bun add is-inner-link
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2026-03-11 |
| First published | 2017-04-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=22.13 |
| Dependencies | 2 |
| Unpacked size | 2.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 104 |
| Author | Zoltan Kochan |
| Maintainers | zkochan |
| Keywords | link, symlink, directory, folder |

## Links

- npm: https://www.npmjs.com/package/is-inner-link
- Repository: https://github.com/zkochan/packages/tree/main/is-inner-link
- Homepage: https://github.com/zkochan/packages/tree/main/is-inner-link#readme
- npm.io page: https://npm.io/package/is-inner-link

## Dependencies (2)

- [is-subdir](https://npm.io/package/is-subdir.md) ^2.0.0
- [resolve-link-target](https://npm.io/package/resolve-link-target.md) ^3.0.0

## Alternatives

- [monaco-yaml](https://npm.io/package/monaco-yaml.md) — 420.1K weekly downloads
- [@crewx/workflow](https://npm.io/package/@crewx/workflow.md) — 3.1K weekly downloads
- [yaml-cat](https://npm.io/package/yaml-cat.md) — 38 weekly downloads
- [nunjucks-in-yaml](https://npm.io/package/nunjucks-in-yaml.md) — 9 weekly downloads
- [shopify-symlinks](https://npm.io/package/shopify-symlinks.md) — 3 weekly downloads

## Recent versions

- 5.0.0 (latest) — 2026-03-11
- 4.0.0 (next) — 2021-02-11
- 3.0.0 — 2019-03-02
- 2.0.2 — 2017-07-25
- 2.0.1 — 2017-07-24
- 2.0.0 — 2017-04-14
- 1.0.0 — 2017-04-14

## README

# is-inner-link

> Returns true if a link targets a directory inside its parent directory

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/is-inner-link.svg)](https://www.npmjs.com/package/is-inner-link)
<!--/@-->

## Installation

```sh
<npm|yarn|pnpm> add is-inner-link
```

## Usage

```js
'use strict'
const isInnerLink = require('is-inner-link')

isInnerLink('node_modules', 'foo')
  .then(link => console.log(link))
  .catch(err => console.error(err))
//> {isInner: false, target: '/zkochan/foo'}
```

## License

[MIT](./LICENSE) © [Zoltan Kochan](https://www.kochan.io)

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