pax_global_header00006660000000000000000000000064135077031710014516gustar00rootroot0000000000000052 comment=a8a951e33b65ddc8613c2cb4bc3f0769ab3e888b is-path-in-cwd-3.0.0/000077500000000000000000000000001350770317100142425ustar00rootroot00000000000000is-path-in-cwd-3.0.0/.editorconfig000066400000000000000000000002571350770317100167230ustar00rootroot00000000000000root = true [*] indent_style = tab end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [*.yml] indent_style = space indent_size = 2 is-path-in-cwd-3.0.0/.gitattributes000066400000000000000000000000231350770317100171300ustar00rootroot00000000000000* text=auto eol=lf is-path-in-cwd-3.0.0/.gitignore000066400000000000000000000000271350770317100162310ustar00rootroot00000000000000node_modules yarn.lock is-path-in-cwd-3.0.0/.npmrc000066400000000000000000000000231350770317100153550ustar00rootroot00000000000000package-lock=false is-path-in-cwd-3.0.0/.travis.yml000066400000000000000000000000651350770317100163540ustar00rootroot00000000000000language: node_js node_js: - '12' - '10' - '8' is-path-in-cwd-3.0.0/index.d.ts000066400000000000000000000005451350770317100161470ustar00rootroot00000000000000/** Check if a path is in the [current working directory](https://en.wikipedia.org/wiki/Working_directory). @example ``` import isPathInCwd = require('is-path-in-cwd'); isPathInCwd('unicorn'); //=> true isPathInCwd('../rainbow'); //=> false isPathInCwd('.'); //=> false ``` */ declare function isPathInCwd(path: string): boolean; export = isPathInCwd; is-path-in-cwd-3.0.0/index.js000066400000000000000000000001731350770317100157100ustar00rootroot00000000000000'use strict'; const isPathInside = require('is-path-inside'); module.exports = path => isPathInside(path, process.cwd()); is-path-in-cwd-3.0.0/index.test-d.ts000066400000000000000000000001611350770317100171160ustar00rootroot00000000000000import {expectType} from 'tsd'; import isPathInCwd = require('.'); expectType(isPathInCwd('unicorn')); is-path-in-cwd-3.0.0/license000066400000000000000000000021251350770317100156070ustar00rootroot00000000000000MIT License Copyright (c) Sindre Sorhus (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. is-path-in-cwd-3.0.0/package.json000066400000000000000000000012351350770317100165310ustar00rootroot00000000000000{ "name": "is-path-in-cwd", "version": "3.0.0", "description": "Check if a path is in the current working directory", "license": "MIT", "repository": "sindresorhus/is-path-in-cwd", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=8" }, "scripts": { "test": "xo && ava && tsd" }, "files": [ "index.js", "index.d.ts" ], "keywords": [ "path", "cwd", "pwd", "check", "filepath", "file", "folder", "in", "inside" ], "dependencies": { "is-path-inside": "^3.0.1" }, "devDependencies": { "ava": "^2.1.0", "tsd": "^0.7.3", "xo": "^0.24.0" } } is-path-in-cwd-3.0.0/readme.md000066400000000000000000000007451350770317100160270ustar00rootroot00000000000000# is-path-in-cwd [![Build Status](https://travis-ci.org/sindresorhus/is-path-in-cwd.svg?branch=master)](https://travis-ci.org/sindresorhus/is-path-in-cwd) > Check if a path is in the [current working directory](https://en.wikipedia.org/wiki/Working_directory) ## Install ``` $ npm install is-path-in-cwd ``` ## Usage ```js const isPathInCwd = require('is-path-in-cwd'); isPathInCwd('unicorn'); //=> true isPathInCwd('../rainbow'); //=> false isPathInCwd('.'); //=> false ``` is-path-in-cwd-3.0.0/test.js000066400000000000000000000003451350770317100155610ustar00rootroot00000000000000import test from 'ava'; import isPathInCwd from '.'; test('main', t => { t.true(isPathInCwd('foo')); t.false(isPathInCwd('.')); t.false(isPathInCwd('/')); t.false(isPathInCwd('..')); t.false(isPathInCwd('../rainbow')); });