New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ddoc

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ddoc - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

13

index.js

@@ -15,5 +15,12 @@ var fs = require('fs'),

} else if (type.isFile()) {
var data = fs.readFileSync(path);
if (p.extname(file) === '.js') { // eval
obj[p.basename(file,'.js')] = Function("return ("+data+");")();
var data = fs.readFileSync(path, 'utf8');
if (p.extname(file) === '.js') { // eval(-ish…actually has to handle bare `function () {}` *and* CommonJS modules!)
// hack from https://github.com/iriscouch/couchjs/blob/71335aac1901a279aff213973f5508b0bc241e31/couchjs.js#L79
data = data.replace(/;+$/, '');
// TODO: we'll still bork on multi-statement modules, probably need separate codepaths for each style
var module = {exports:{}};
obj[p.basename(file,'.js')] = Function('require', 'module', 'exports', "return ("+data+");")(function (module) {
return require(p.join(ddoc_dir,module));
}, module, module.exports) || module.exports;
} else if (p.extname(file) === '.json') {

@@ -20,0 +27,0 @@ obj[p.basename(file,'.json')] = JSON.parse(data);

{
"name": "ddoc",
"version": "1.0.1",
"version": "1.1.0",
"description": "require() a traditional couchapp into your node code",

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

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