Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
index.js | D | 12-May-2024 | 236 | 15 | 11 | |
license | D | 12-May-2024 | 1.1 KiB | 22 | 17 | |
package.json | D | 12-May-2024 | 1.7 KiB | 71 | 70 | |
readme.md | D | 12-May-2024 | 595 | 35 | 20 |
readme.md
1# is-path-inside [![Build Status](https://travis-ci.org/sindresorhus/is-path-inside.svg?branch=master)](https://travis-ci.org/sindresorhus/is-path-inside) 2 3> Check if a path is inside another path 4 5 6## Install 7 8``` 9$ npm install --save is-path-inside 10``` 11 12 13## Usage 14 15```js 16var isPathInside = require('is-path-inside'); 17 18isPathInside('a/b/c', 'a/b'); 19//=> true 20 21isPathInside('a/b/c', 'x/y'); 22//=> false 23 24isPathInside('a/b/c', 'a/b/c'); 25//=> false 26 27isPathInside('/Users/sindresorhus/dev/unicorn', '/Users/sindresorhus'); 28//=> true 29``` 30 31 32## License 33 34MIT © [Sindre Sorhus](http://sindresorhus.com) 35