chushihua

This commit is contained in:
li
2026-01-26 23:20:48 +08:00
commit 7b5aab0206
22521 changed files with 3300090 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
'use strict';
var path = require('path');
module.exports = function (str) {
return path.resolve(str) === path.resolve(process.cwd());
};
+33
View File
@@ -0,0 +1,33 @@
{
"name": "is-path-cwd",
"version": "1.0.0",
"description": "Check if a path is CWD",
"license": "MIT",
"repository": "sindresorhus/is-path-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"
],
"devDependencies": {
"mocha": "*"
}
}
+28
View File
@@ -0,0 +1,28 @@
# is-path-cwd [![Build Status](https://travis-ci.org/sindresorhus/is-path-cwd.svg?branch=master)](https://travis-ci.org/sindresorhus/is-path-cwd)
> Check if a path is [CWD](http://en.wikipedia.org/wiki/Working_directory)
## Install
```sh
$ npm install --save is-path-cwd
```
## Usage
```js
var isPathCwd = require('is-path-cwd');
isPathCwd(process.cwd());
//=> true
isPathCwd('unicorn');
//=> false
```
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)