Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cwd

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cwd - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

3

index.js

@@ -34,2 +34,3 @@ /*!

var fp = path.resolve.apply(path, [].concat.apply([], arguments));
if (cache.hasOwnProperty(fp)) {

@@ -42,3 +43,3 @@ return cache[fp];

var base = res ? path.dirname(res) : '';
return (cache[fp] = path.resolve(base, fp));
return (cache[fp] = base);
} catch (err) {

@@ -45,0 +46,0 @@ return (cache[fp] = fp);

{
"name": "cwd",
"description": "Node.js util for easily getting the current working directory of a project based on package.json or the given path.",
"version": "0.6.0",
"description": "Easily get the CWD (current working directory) of a project based on package.json, optionally starting from a given path. (Node.js/javascript util)",
"version": "0.7.0",
"homepage": "https://github.com/jonschlinkert/cwd",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"repository": {
"type": "git",
"url": "git://github.com/jonschlinkert/cwd.git"
},
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"repository": "jonschlinkert/cwd",
"bugs": {
"url": "https://github.com/jonschlinkert/cwd/issues"
},
"license": {
"type": "MIT",
"url": "https://github.com/jonschlinkert/cwd/blob/master/LICENSE"
},
"license": "MIT",
"files": [

@@ -32,8 +23,7 @@ "index.js"

"dependencies": {
"look-up": "^0.7.0"
"look-up": "^0.7.1"
},
"devDependencies": {
"mocha": "^2.2.1",
"normalize-path": "^1.0.0",
"should": "^5.2.0"
"normalize-path": "^1.0.0"
},

@@ -43,4 +33,2 @@ "keywords": [

"cwd",
"dep",
"deps",
"dir",

@@ -50,8 +38,2 @@ "directory",

"filepath",
"files",
"fp",
"fs",
"glob",
"node",
"npm",
"path",

@@ -64,3 +46,15 @@ "paths",

"working"
]
],
"verb": {
"related": {
"list": [
"is-absolute",
"is-relative",
"relative",
"global-paths",
"global-prefix",
"global-modules"
]
}
}
}

@@ -1,9 +0,11 @@

# cwd [![NPM version](https://badge.fury.io/js/cwd.svg)](http://badge.fury.io/js/cwd) [![Build Status](https://travis-ci.org/jonschlinkert/cwd.svg)](https://travis-ci.org/jonschlinkert/cwd)
# cwd [![NPM version](https://badge.fury.io/js/cwd.svg)](http://badge.fury.io/js/cwd) [![Build Status](https://travis-ci.org/jonschlinkert/cwd.svg)](https://travis-ci.org/jonschlinkert/cwd)
> Node.js util for easily getting the current working directory of a project based on package.json or the given path.
> Easily get the CWD (current working directory) of a project based on package.json, optionally starting from a given path. (Node.js/javascript util)
## Install with [npm](npmjs.org)
## Install
```bash
npm i cwd --save
Install with [npm](https://www.npmjs.com/)
```sh
$ npm i cwd --save
```

@@ -22,17 +24,21 @@

## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/cwd/issues)
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/cwd/issues/new)
## Running tests
Install dev dependencies.
```bash
npm i -d && npm test
Install dev dependencies:
```sh
$ npm i -d && npm test
```
## Other projects
* [global-paths](https://github.com/jonschlinkert/global-paths): Returns an array of unique "global" directories based on the user's platform and environment. The… [more](https://github.com/jonschlinkert/global-paths)
* [global-prefix](https://github.com/jonschlinkert/global-prefix): Get the npm global path prefix.
* [global-modules](https://github.com/jonschlinkert/global-modules): The directory used by npm for globally installed npm modules.
* [is-absolute](https://github.com/jonschlinkert/is-absolute): Return true if a file path is absolute.
* [is-relative](https://github.com/jonschlinkert/is-relative): Returns `true` if the path appears to be relative.
* [export-files](https://github.com/jonschlinkert/export-files): node.js utility for exporting a directory of files as modules.
* [normalize-path](https://github.com/jonschlinkert/normalize-path): Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes.
* [relative](https://github.com/jonschlinkert/relative): Get the relative filepath from path A to path B. Calculates from file-to-directory, file-to-file, directory-to-file, and directory-to-directory.
* [relative](https://github.com/jonschlinkert/relative#readme): Get the relative filepath from path A to path B. Calculates from file-to-directory, file-to-file, directory-to-file,… [more](https://github.com/jonschlinkert/relative#readme)

@@ -42,15 +48,15 @@ ## Author

**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright (c) 2015 Jon Schlinkert
Released under the MIT license
Copyright © 2015 Jon Schlinkert
Released under the MIT license.
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 16, 2015._
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 20, 2015._
[look-up]: https://github.com/jonschlinkert/lookup
<!-- deps: mocha should normalize-path -->
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc