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

typal

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typal - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

5

build/lib/Property.js

@@ -7,2 +7,7 @@ const { getPropType, getNameWithDefault } = require('.');

class Property {
static fromXML(...args) {
const prop = new Property()
prop.fromXML(...args)
return prop
}
fromXML(content,

@@ -9,0 +14,0 @@ { name, string, boolean, opt, number, type, default: def },

12

build/lib/Type.js

@@ -24,2 +24,4 @@ let extractTags = require('rexml'); if (extractTags && extractTags.__esModule) extractTags = extractTags.default;

/** @type {Property[]} */
this.properties = []
if (content) {

@@ -59,2 +61,3 @@ const ps = extractTags('prop', content)

}
/** @param {Type[]} allTypes */
toMarkdown(allTypes = []) {

@@ -117,4 +120,5 @@ const t = this.type ? `\`${this.type}\`` : ''

*/
const makePropsTable = (props = [], allTypes = []) => {
const makePropsTable = (props = [], allTypes = []) => {
if (!props.length) return ''
const anyHaveDefault = props.some(({ hasDefault }) => hasDefault)

@@ -128,3 +132,6 @@ const h = ['Name', 'Type', 'Description', 'Default']

})
const res = [h, ...ps]
const pre = [h, ...ps]
const res = anyHaveDefault
? pre
: pre.map(([name, type, desc]) => [name, type, desc])
const j = JSON.stringify(res)

@@ -153,2 +160,3 @@ return `

module.exports.getLinks = getLinks
module.exports.makePropsTable = makePropsTable
//# sourceMappingURL=Type.js.map
## 25 September 2018
### 1.2.0
- [feature] Skip printing `Default` column when no properties have it.
### 1.1.0

@@ -4,0 +8,0 @@

4

package.json
{
"name": "typal",
"version": "1.1.0",
"version": "1.2.0",
"description": "Keeps JSDoc types in XML files and converts them to JavaScript and Markdown.",

@@ -39,3 +39,3 @@ "main": "build",

"alamode": "1.5.1",
"documentary": "1.19.0",
"documentary": "1.20.0",
"eslint-config-artdeco": "1.0.1",

@@ -42,0 +42,0 @@ "yarn-s": "1.1.0",

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