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

cd

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cd - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3

2

index.js

@@ -64,4 +64,4 @@ var fs = require('fs');

}
break;
}
break;
case SINGLE_S:

@@ -68,0 +68,0 @@ if(NL === current) {

{
"name": "cd",
"version": "0.3.2",
"version": "0.3.3",
"description": "chdir in chainer fashion + read file",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -10,3 +10,3 @@ cd? cd

To run tests inside module dir start:
To run tests enter module dir and run:

@@ -26,12 +26,14 @@ node test.js

var cd = require('cd');
// You can use any path you like, not only current dir '.'
var dir = new cd('.');
// Read lol.json from current directory
// Read ./lol.json
var lol = dir('lol.json');
// Read wtf.js from test directory.
// Read ./test/wtf.js directory.
var wtf = dir().test('wtf.js');
// Chain as you like
var file = dir().dir1().dir2(file_in_dir2);
// Chain as you like: ./dir1/dir2/fileInDir2
var file = dir().dir1().dir2(fileInDir2);

@@ -42,3 +44,3 @@ /*

try {
content = dir().existDir1().nonexistDir().existDir2(file2);
content = dir().existDir1().nonexistDir().someDir(someDirFile);
} catch(e) {

@@ -45,0 +47,0 @@ // ...

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