Skip to content
This repository has been archived by the owner on Dec 27, 2024. It is now read-only.

Commit

Permalink
fix: lint error fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
joolfe committed Mar 26, 2021
1 parent fbc72be commit de025fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ lib-cov

# Coverage directory used by tools like istanbul
coverage
coverage/**
*.lcov

# nyc test coverage
Expand Down
14 changes: 7 additions & 7 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@ async function postmanToOpenApi (input, output, { info = {}, defaultTag = 'defau
const tags = {}

for (let [i, element] of items.entries()) {
while (element['item'] != null) { // is a folder
while (element.item != null) { // is a folder
const { item, name, description: tagDesc } = element
const tagged = item.map(e => ({ ...e, tag: element.tag ? element.tag + ' > ' + name : name }))
tags[element.tag ? element.tag + ' > ' + name : name] = tagDesc
if (tagged.length){
if (tagged.length) {
items.splice(i, 1, ...tagged)
element = tagged.shift()
} else {
element = null;
break;
element = null
break
}
}
if (!element) {
continue;
continue
}
const {
request: { url, method, body, description: rawDesc, header },
name: summary, tag = defaultTag, event: events
} = element

if (url.raw == "") {
if (url.raw === '') {
console.log(`Empty url for request '${summary}'. Ignoring this request`)
continue;
continue
}
const { path, query, protocol, host, port } = scrapeURL(url)
domains.add(calculateDomains(protocol, host, port))
Expand Down

0 comments on commit de025fd

Please sign in to comment.