mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 01:38:07 +08:00
Will be used to make sure no default exports are in DevTools. The PRESUBMIT.py has been updated to skip running the formatting check if node_modules files are affected, to workaround crbug.com/1068198. DISABLE_THIRD_PARTY_CHECK=Add plugin to node_modules Bug: 1068198 Change-Id: I04d4dc813daa01099f21d40edf47aaefcc0b045f Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2135610 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2.3 KiB
2.3 KiB
contains-path 
Return true if a file path contains the given path.
Install
Install with npm
$ npm i contains-path --save
Usage
var contains = require('contains-path');
true
All of the following return true:
containsPath('./a/b/c', 'a');
containsPath('./a/b/c', 'a/b');
containsPath('./b/a/b/c', 'a/b');
containsPath('/a/b/c', '/a/b');
containsPath('/a/b/c', 'a/b');
containsPath('a', 'a');
containsPath('a/b/c', 'a');
//=> true
false
All of the following return false:
containsPath('abc', 'a');
containsPath('abc', 'a.md');
containsPath('./b/a/b/c', './a/b');
containsPath('./b/a/b/c', './a');
containsPath('./b/a/b/c', '/a/b');
containsPath('/b/a/b/c', '/a/b');
//=> false
Related projects
- ends-with: Returns
trueif the givenstringorarrayends withsuffixusing strict equality for… more - is-absolute: Return true if a file path is absolute.
- is-relative: Returns
trueif the path appears to be relative. - path-ends-with: Return
trueif a file path ends with the given string/suffix. - path-segments: Get n specific segments of a file path, e.g. first 2, last 3, etc.
- parse-filepath: Parse a filepath into an object, yielding predictable results for basename and extname.
Running tests
Install dev dependencies:
$ npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
Jon Schlinkert
License
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on July 07, 2015.