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

soldoc

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

soldoc - npm Package Compare versions

Comparing version 0.1.2-beta.1 to 0.1.2-beta.2

46

dist/organize.js

@@ -22,14 +22,18 @@ "use strict";

function extendParamsAstWithNatspec(node) {
return node.parameters === null
? null
: node.parameters.map(function (parameter) { return (__assign(__assign({}, parameter), { natspec: parameter.name === null || node.natspec === null
? ''
: node.natspec.params[parameter.name] })); });
if (node.parameters === null) {
return null;
}
return node.parameters.map(function (parameter) { return (__assign(__assign({}, parameter), { natspec: parameter.name === null ||
node.natspec === null ||
node.natspec.params === undefined
? ''
: node.natspec.params[parameter.name] })); });
}
function extendReturnParamsAstWithNatspec(node) {
return node.returnParameters === null
? null
: node.returnParameters.map(function (parameter) { return (__assign(__assign({}, parameter), { natspec: node.natspec === null
? ''
: node.natspec.return })); });
if (node.returnParameters === null || node.returnParameters === undefined) {
return null;
}
return node.returnParameters.map(function (parameter) { return (__assign(__assign({}, parameter), { natspec: node.natspec === null
? ''
: node.natspec.return })); });
}

@@ -61,15 +65,6 @@ /**

EventDefinition: function (node) {
var paramComments = new Map();
var rawComments;
if (rawContractData.comments.event !== undefined) {
if (rawContractData.comments.event.get(node.name) !== undefined) {
paramComments = rawContractData.comments.event.get(node.name).param;
rawComments = rawContractData.comments.event.get(node.name);
}
}
contractDataWithComments.events.push({
ast: node,
comments: rawComments,
paramComments: paramComments,
params: function () { return function (val, render) { return paramComments.get(render(val)); }; },
parameters: extendParamsAstWithNatspec(node),
returnParameters: extendReturnParamsAstWithNatspec(node),
});

@@ -79,11 +74,6 @@ },

if (node.isConstructor) {
var paramComments_1 = new Map();
if (rawContractData.comments.constructor !== undefined) {
paramComments_1 = rawContractData.comments.constructor.param;
}
contractDataWithComments.constructor = {
ast: node,
comments: rawContractData.comments.constructor,
paramComments: paramComments_1,
params: function () { return function (val, render) { return paramComments_1.get(render(val)); }; },
parameters: extendParamsAstWithNatspec(node),
returnParameters: extendReturnParamsAstWithNatspec(node),
};

@@ -90,0 +80,0 @@ }

{
"name": "soldoc",
"version": "0.1.2-beta.1",
"version": "0.1.2-beta.2",
"description": "An html page and pdf solidity documentation generator, based in NatSpec format.",

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

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc