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

@typedefs/parser

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typedefs/parser - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

11

build/lib.js

@@ -134,3 +134,3 @@ const { Fn, fn,

const parseType = () => {
const parseType = (specialAllowed = true) => {
/** @type {!_typedefsParser.Type} */

@@ -142,2 +142,4 @@ const type = {}

if ([nullable, nonNullable].includes(token)) {
// can repeat for all specials but don't
if (!specialAllowed) throw new Error(`${token} not allowed after .`)
type.nullable = token === nullable

@@ -175,2 +177,9 @@ consume()

}
while(peek() == '.') {
type.name += '.'
consume()
const { name } = parseType(false)
if (!name) throw new Error('Expected to see the name after .')
type.name += name
}
return type

@@ -177,0 +186,0 @@ }

## 26 April 2019
### [1.0.2](https://github.com/artdecocode/parser/compare/v1.0.1...v1.0.2)
- [feature] Parse namespaces.
### [1.0.1](https://github.com/artdecocode/parser/compare/v1.0.0...v1.0.1)

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

2

package.json
{
"name": "@typedefs/parser",
"version": "1.0.1",
"version": "1.0.2",
"description": "The Parser For JSDoc Types.",

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

@@ -134,3 +134,3 @@ import { Fn, fn,

const parseType = () => {
const parseType = (specialAllowed = true) => {
/** @type {!_typedefsParser.Type} */

@@ -142,2 +142,4 @@ const type = {}

if ([nullable, nonNullable].includes(token)) {
// can repeat for all specials but don't
if (!specialAllowed) throw new Error(`${token} not allowed after .`)
type.nullable = token === nullable

@@ -175,2 +177,9 @@ consume()

}
while(peek() == '.') {
type.name += '.'
consume()
const { name } = parseType(false)
if (!name) throw new Error('Expected to see the name after .')
type.name += name
}
return type

@@ -177,0 +186,0 @@ }

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