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

@esydoc/doclet-parser

Package Overview
Dependencies
Maintainers
2
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@esydoc/doclet-parser - npm Package Compare versions

Comparing version 2.0.7-beta.16 to 2.0.7-beta.17

38

dist/index.js

@@ -90,10 +90,30 @@ /*!

}
// export function getRealType() {
// try {
// if (typeof type === 'string') return 'string'
// return type.names[0] || 'any'
// } catch (err) {
// return 'any'
// }
// }
/**
* 获取 __polytype__ 的实际 type
*/
function getPolyType(type) {
if (typeof type === 'object') {
var names = (type || {}).names;
return names[0];
}
// 字符串 声明
if (/^("|').*("|')$/g.test(type))
return 'string';
// 字符串 声明
if (/^-?\d+$/g.test(type))
return 'number';
return type;
}
/**
* 获取 __polytype__ 的实际 value
*/
function getPolyVal(name) {
if (/^("|').*("|')$/g.test(name)) {
return name.replace(/\'|\"/g, '');
}
if (/^-?\d+$/g.test(name)) {
return Number(name);
}
return name;
}

@@ -777,2 +797,4 @@ var resolveTag = function (tagNames) {

exports.getFirstChild = getFirstChild;
exports.getPolyType = getPolyType;
exports.getPolyVal = getPolyVal;
exports.getShortDesc = getShortDesc;

@@ -779,0 +801,0 @@ exports.isDateTreeNode = isDateTreeNode;

@@ -14,1 +14,11 @@ export declare const genUniId: (prefix: string) => string;

export declare function getShortDesc(str?: string): string;
/**
* 获取 __polytype__ 的实际 type
*/
export declare function getPolyType(type: string | {
names: string[];
}): string;
/**
* 获取 __polytype__ 的实际 value
*/
export declare function getPolyVal(name: string): string | number;
{
"name": "@esydoc/doclet-parser",
"version": "2.0.7-beta.16",
"version": "2.0.7-beta.17",
"description": "The parser for doclet that it resolved by jsdoc",

@@ -28,5 +28,5 @@ "author": "Alex <857276958@qq.com>",

"dependencies": {
"@esydoc/share": "^2.0.7-beta.16"
"@esydoc/share": "^2.0.7-beta.17"
},
"gitHead": "8066de0a348bd5ae23db0751f495d42930df6be0"
"gitHead": "33d54b389c57e118737aefb502d5d026b2ff3a6c"
}
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