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

docworks-model

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docworks-model - npm Package Compare versions

Comparing version 1.6.4 to 1.8.4

.eslintrc.json

17

package.json
{
"name": "docworks-model",
"version": "1.6.4",
"version": "1.8.4",
"description": "The model objects for docworks json files",
"main": "dist/index.js",
"main": "src/index.js",
"scripts": {
"build": "babel src --out-dir dist",
"prepublish": "babel src --out-dir dist",
"lint": "eslint src",
"build": "npm run lint",
"prepublish": "#",
"test": "echo \"Error: no test specified\""

@@ -14,7 +15,5 @@ },

"devDependencies": {
"babel-cli": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-1": "^6.24.1",
"babel-register": "^6.24.1"
}
"eslint": "^6.0.1"
},
"gitHead": "af20090fc0d9b22e9b504b26e3b2f025ddb05af9"
}
export function Service(name, memberOf, mixes, labels, properties, operations, callbacks, messages, location, docs, extra) {
function Service(name, memberOf, mixes, labels, properties, operations, callbacks, messages, location, docs, extra) {
return {

@@ -19,6 +19,6 @@ name: name,

export const Void = 'void';
export const Any = '*';
const Void = 'void'
const Any = '*'
export function Docs(summary, description, links, examples, extra) {
function Docs(summary, description, links, examples, extra) {
return {

@@ -33,3 +33,3 @@ summary: summary,

export function Example(title, body, extra) {
function Example(title, body, extra) {
return {

@@ -42,3 +42,3 @@ title: title,

export function Return(type, doc) {
function Return(type, doc) {
return {

@@ -50,3 +50,3 @@ type: type,

export function Operation(name, labels, nameParams, params, ret, locations, docs, extra) {
function Operation(name, labels, nameParams, params, ret, locations, docs, extra) {
return {

@@ -64,3 +64,3 @@ name: name,

export function Param(name, type, doc, optional, defaultValue, spread) {
function Param(name, type, doc, optional, defaultValue, spread) {
return {

@@ -76,3 +76,3 @@ name: name,

export function Property(name, labels, isGet, isSet, type, defaultValue, locations, docs, extra) {
function Property(name, labels, isGet, isSet, type, defaultValue, locations, docs, extra) {
return {

@@ -91,3 +91,3 @@ name: name,

export function Message(name, labels, members, locations, docs, extra) {
function Message(name, labels, members, locations, docs, extra) {
return {

@@ -103,3 +103,3 @@ name: name,

export function MessageMember(name, type, doc, optional) {
function MessageMember(name, type, doc, optional) {
return {

@@ -113,18 +113,18 @@ name: name,

export function AtomicType(name) {
return name;
function AtomicType(name) {
return name
}
export function UnionType(names) {
return names;
function UnionType(names) {
return names
}
export function GeneticType(name, typeParams) {
function GeneticType(name, typeParams) {
return {
name: name,
typeParams: typeParams
};
}
}
export function Location(filename, lineno) {
function Location(filename, lineno) {
return {

@@ -136,18 +136,18 @@ filename: filename,

export function JsDocError(message, locations) {
function JsDocError(message, locations) {
const groupByFile = (groups, location) => {
if (groups[location.filename])
groups[location.filename].push(location);
groups[location.filename].push(location)
else
groups[location.filename] = [location];
return groups;
};
groups[location.filename] = [location]
return groups
}
let files = locations.reduce(groupByFile, {});
let files = locations.reduce(groupByFile, {})
let fileLocations = Object.keys(files)
.map((group) => {
let linenos = files[group].map(location => location.lineno);
return `${group} (${linenos.join(", ")})`;
let linenos = files[group].map(location => location.lineno)
return `${group} (${linenos.join(', ')})`
})
.join(", ");
.join(', ')
return {

@@ -157,2 +157,21 @@ message: message,

}
}
}
module.exports = {
Void,
Any,
AtomicType,
Docs,
Example,
GeneticType,
JsDocError,
Location,
Message,
MessageMember,
Operation,
Param,
Property,
Return,
Service,
UnionType
}
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