项目原始demo,不改动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

пре 4 година
12345678910111213141516171819202122232425262728293031323334
  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. > Check if a path is inside another path
  3. ## Install
  4. ```
  5. $ npm install --save is-path-inside
  6. ```
  7. ## Usage
  8. ```js
  9. var isPathInside = require('is-path-inside');
  10. isPathInside('a/b/c', 'a/b');
  11. //=> true
  12. isPathInside('a/b/c', 'x/y');
  13. //=> false
  14. isPathInside('a/b/c', 'a/b/c');
  15. //=> false
  16. isPathInside('/Users/sindresorhus/dev/unicorn', '/Users/sindresorhus');
  17. //=> true
  18. ```
  19. ## License
  20. MIT © [Sindre Sorhus](http://sindresorhus.com)