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

docsify-ts-api

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docsify-ts-api - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

36

lib/context/symbolsQuery.js

@@ -9,5 +9,23 @@ const context = require("./context");

"symbolName": (q, symbol) => find(q, symbol.symbolName),
"label": (q, symbol) => symbol.labels.find((label) => find(q, label))
"label": (q, symbol) => symbol.labels.find((label) => find(q, label.key))
};
const findSymbols = (symbols, options) => {
context.symbols.forEach((symbol) => {
const keys = Object.keys(options);
const result = keys.reduce((acc, key) => {
if (options[key] !== undefined) {
if (rules[key] && rules[key](options[key], symbol)) {
return acc + 1;
}
}
return acc;
}, 0);
if (result === keys.length) {
symbols.push(symbol.symbolName);
}
});
};
module.exports = {

@@ -25,17 +43,5 @@ /**

let symbols = [];
context.symbols.forEach((symbol) => {
const keys = Object.keys(options);
const result = keys.reduce((acc, key) => {
if (options[key] !== undefined) {
if (rules[key] && rules[key](options[key], symbol)) {
return acc + 1;
}
}
return acc;
}, 0);
if (result === keys.length) {
symbols.push(symbol.symbolName);
}
[].concat(options).forEach((options) => {
findSymbols(symbols, options);
});

@@ -42,0 +48,0 @@

@@ -35,3 +35,2 @@ const { context } = require("../context/index");

);
return {

@@ -38,0 +37,0 @@ name,

@@ -111,5 +111,7 @@ const path = require("path");

if (this.symbolType !== "interface") {
const exported = require(this.module.moduleLibPath + "/index.js");
const symbolPrivate = exported[this.symbolName.trim()];
this.private = !symbolPrivate;

@@ -153,4 +155,4 @@ if (this.private) {

}
return this.srcPath.replace(context.root + "/src", "ts-express-decorators/lib").replace(/\.ts$/, "");
const path = context.projectName + context.libDir.replace(context.root, "");
return this.srcPath.replace(context.root + "/src", path).replace(/\.ts$/, "");
}

@@ -157,0 +159,0 @@

@@ -153,3 +153,5 @@ "use strict";

setSymbol(symbol) {
if (symbol.symbolName === "") {
return;
}
if (context.symbols.has(symbol.symbolName)) {

@@ -156,0 +158,0 @@ context.symbols.get(symbol.symbolName).merge(symbol);

@@ -38,3 +38,3 @@ "use strict";

.then(() => {
writeTemplate(context.docsDir + "/**/*.ejs");
writeTemplate(context.docsDir + "/**/*.{ejs,emd}");
})

@@ -41,0 +41,0 @@ .then(() => $log.info("done"))

@@ -19,3 +19,3 @@ "use strict";

.forEach((file) => {
const outfile = file.replace(".ejs", ".md");
const outfile = file.replace(/.ejs|.emd/, ".md");
$log.info("Write", outfile);

@@ -22,0 +22,0 @@

{
"name": "docsify-ts-api",
"version": "1.0.2",
"version": "1.0.3",
"description": "Generate documentation on TypeScript API for docsify tool",

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

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