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.0 to 0.3.1

2

package.json
{
"name": "cd",
"version": "0.3.0",
"version": "0.3.1",
"description": "chdir in chainer fashion + read file",

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

@@ -24,13 +24,13 @@ cd? cd

var Cd = require('cd');
var cd = new Cd('.');
var cd = require('cd');
var dir = new cd('.');
// Read lol.json from current directory
var lol = cd('lol.json');
var lol = dir('lol.json');
// Read wtf.js from test directory.
var wtf = cd().test('wtf.js');
var wtf = dir().test('wtf.js');
// Chain as you like
var file = cd().dir1().dir2(file_in_dir2);
var file = dir().dir1().dir2(file_in_dir2);

@@ -41,3 +41,3 @@ /*

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

@@ -44,0 +44,0 @@ // ...

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

var Cd = require('./index.js');
var cd = Cd('.');
var cd = require('./index.js');
var dir = cd('.');
var output = cd().test('oh.txt');
var output = dir().test('oh.txt');
console.log('oh.txt:'+output);
var output = cd().test('lol.js');
var output = dir().test('lol.js');
output = cd().test('wtf.json');
output = dir().test('wtf.json');
console.log('wtf.json:'+JSON.stringify(output));

@@ -1,1 +0,6 @@

This is oh.txt file.
This is oh.txt file line 1.
This is oh.txt file line 2.
This is oh.txt file line 3.
This is oh.txt file line 4.
This is oh.txt file line 5.
This is oh.txt file line 6.
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