pax_global_header00006660000000000000000000000064123731030550014511gustar00rootroot0000000000000052 comment=a5a2a7c967eae3f6faee9ab5e40abca6127d55de is-path-in-cwd-1.0.0/000077500000000000000000000000001237310305500142335ustar00rootroot00000000000000is-path-in-cwd-1.0.0/.editorconfig000066400000000000000000000003371237310305500167130ustar00rootroot00000000000000root = true [*] indent_style = tab end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [package.json] indent_style = space indent_size = 2 [*.md] trim_trailing_whitespace = false is-path-in-cwd-1.0.0/.gitattributes000066400000000000000000000000141237310305500171210ustar00rootroot00000000000000* text=auto is-path-in-cwd-1.0.0/.gitignore000066400000000000000000000000151237310305500162170ustar00rootroot00000000000000node_modules is-path-in-cwd-1.0.0/.jshintrc000066400000000000000000000002761237310305500160650ustar00rootroot00000000000000{ "node": true, "esnext": true, "bitwise": true, "camelcase": true, "curly": true, "immed": true, "newcap": true, "noarg": true, "undef": true, "unused": "vars", "strict": true } is-path-in-cwd-1.0.0/.travis.yml000066400000000000000000000000461237310305500163440ustar00rootroot00000000000000language: node_js node_js: - '0.10' is-path-in-cwd-1.0.0/index.js000066400000000000000000000002141237310305500156750ustar00rootroot00000000000000'use strict'; var isPathInside = require('is-path-inside'); module.exports = function (str) { return isPathInside(str, process.cwd()); }; is-path-in-cwd-1.0.0/license000066400000000000000000000021371237310305500156030ustar00rootroot00000000000000The MIT License (MIT) 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-1.0.0/package.json000066400000000000000000000012321237310305500165170ustar00rootroot00000000000000{ "name": "is-path-in-cwd", "version": "1.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": "http://sindresorhus.com" }, "engines": { "node": ">=0.10.0" }, "scripts": { "test": "mocha" }, "files": [ "index.js" ], "keywords": [ "path", "cwd", "pwd", "check", "filepath", "file", "folder", "in", "inside" ], "dependencies": { "is-path-inside": "^1.0.0" }, "devDependencies": { "mocha": "*" } } is-path-in-cwd-1.0.0/readme.md000066400000000000000000000010131237310305500160050ustar00rootroot00000000000000# 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](http://en.wikipedia.org/wiki/Working_directory) ## Install ```sh $ npm install --save is-path-in-cwd ``` ## Usage ```js var isPathInCwd = require('is-path-in-cwd'); isPathInCwd('unicorn'); //=> true isPathInCwd('../rainbow'); //=> false ``` ## License MIT © [Sindre Sorhus](http://sindresorhus.com) is-path-in-cwd-1.0.0/test.js000066400000000000000000000004331237310305500155500ustar00rootroot00000000000000'use strict'; var assert = require('assert'); var isPathInCwd = require('./'); it('should check if path is cwd', function () { assert(isPathInCwd('foo')); assert(!isPathInCwd('.')); assert(!isPathInCwd('/')); assert(!isPathInCwd('..')); assert(!isPathInCwd('../rainbow')); });