Socket
Socket
Sign inDemoInstall

fs-jetpack

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.0 to 0.5.1

15

lib/jetpack.js

@@ -27,14 +27,11 @@ // The main thing. Here everything starts.

var cwd = function (newCwdPath) {
// return current CWD if no parameter...
if (newCwdPath === undefined) {
var cwd = function () {
// return current CWD if no arguments specified...
if (arguments.length === 0) {
return getCwdPath();
}
// ...create new CWD context otherwise
if (typeof newCwdPath === 'string') {
newCwdPath = pathUtil.resolve(getCwdPath(), newCwdPath);
} else {
newCwdPath = null;
}
return jetpackContext(newCwdPath);
var args = Array.prototype.slice.call(arguments);
var pathParts = [getCwdPath()].concat(args);
return jetpackContext(pathUtil.resolve.apply(null, pathParts));
}

@@ -41,0 +38,0 @@

2

package.json
{
"name": "fs-jetpack",
"description": "Higher level API for 'fs' library",
"version": "0.5.0",
"version": "0.5.1",
"author": "Jakub Szwacz <jakub@szwacz.com>",

@@ -6,0 +6,0 @@ "dependencies": {

@@ -32,2 +32,7 @@ "use strict";

it('cwd can join path parts', function () {
var jetCwd = jetpack.cwd('a', 'b', 'c');
expect(jetCwd.cwd()).toBe(pathUtil.resolve(process.cwd(), 'a', 'b', 'c'));
});
});
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc