Socket
Socket
Sign inDemoInstall

nodejs-notebook

Package Overview
Dependencies
2
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.0 to 1.2.1

src/NodebookManager.js

6

index.js

@@ -9,2 +9,3 @@ /*

const fs = require('fs');
const { NodebookManager } = require('./src/NodebookManager.js');

@@ -48,6 +49,11 @@ // Default Classes

function getManager() {
return new NodebookManager();
}
module.exports = {
// Functions
clearLog,
getManager,
// Default

@@ -54,0 +60,0 @@ Nodebook,

2

package.json
{
"name": "nodejs-notebook",
"version": "1.2.0",
"version": "1.2.1",
"description": "Note down or jot down anything in any editable file in the world.",

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

@@ -0,0 +0,0 @@ # nodejs-notebook

@@ -0,0 +0,0 @@ const fs = require('fs');

@@ -0,0 +0,0 @@ const fs = require('fs');

@@ -0,0 +0,0 @@ const fs = require('fs');

@@ -0,0 +0,0 @@ const fs = require('fs');

@@ -0,0 +0,0 @@ const fs = require('fs');

@@ -0,0 +0,0 @@ const fs = require('fs');

@@ -18,7 +18,7 @@ const fs = require('fs');

}
}
module.exports = {
TSNotebook
TSNotebook,
};
const fs = require('fs');
const zlib = require('zlib');

@@ -149,3 +150,18 @@ const { NodebookError } = require('./NodebookError.js');

}
compress(type) {
const name = this.name;
const filetype = this.type;
const err = new NodebookError('"type" must be "zip", "tar", or "gz"');
if (!type || typeof type !== 'string' || (type !== 'zip' && type !== 'tar' && type !== 'gz')) throw err;
const gzip = zlib.createGzip();
const input = fs.createReadStream(`${name}.${filetype}`);
const output = fs.createWriteStream(`${name}.${filetype}.${type}`);
input.pipe(gzip).pipe(output);
}
}

@@ -152,0 +168,0 @@ module.exports = {

@@ -0,0 +0,0 @@ class NodebookError extends Error {

@@ -0,0 +0,0 @@ const fs = require('fs');

@@ -0,0 +0,0 @@ const fs = require('fs');

@@ -0,0 +0,0 @@ const fs = require('fs');

@@ -0,0 +0,0 @@ const fs = require('fs');

@@ -0,0 +0,0 @@ const fs = require('fs');

@@ -0,0 +0,0 @@ const fs = require('fs');

@@ -0,0 +0,0 @@ const { NodebookError } = require('../NodebookError.js');

@@ -56,3 +56,3 @@ const fs = require('fs');

}
else lines[metaLine] = `${newcode}\n${oldcode}`;
else {lines[metaLine] = `${newcode}\n${oldcode}`;}

@@ -83,3 +83,3 @@ fs.writeFileSync(`${name}.${type}`, lines.join('\n'), { encoding: 'utf-8' });

}
else lines[linkLine] = `${newcode}\n${oldcode}`;
else {lines[linkLine] = `${newcode}\n${oldcode}`;}

@@ -154,3 +154,3 @@ fs.writeFileSync(`${name}.${type}`, lines.join('\n'), { encoding: 'utf-8' });

module.exports = {
HTMLNotebook
HTMLNotebook,
};

@@ -0,0 +0,0 @@ const fs = require('fs');

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc