Showing 52 of 282 total issues
Function convert
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ postData, fullUrl, method, allHeaders }, options) => {
const opts = {
indent: ' ',
...options,
};
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function convert
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ method, url, cookies, queryObj, postData, headersObj }, options) => {
const opts = {
indent: ' ',
...options,
};
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function convert
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
convert: (
{ uriObj, postData, fullUrl, method, httpVersion, cookies, headersObj },
options = {},
) => {
const {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function convert
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ postData, method, fullUrl, allHeaders }, options) => {
const opts = {
indent: ' ',
...options,
};
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function literalRepresentation
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const literalRepresentation = (
value: any,
opts: Record<string, any>,
indentLevel?: number,
): any => {
Function escapeString
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function escapeString(rawValue: any, options: EscapeOptions = {}) {
const {
delimiter = '"',
escapeChar = '\\',
escapeNewlines = true
Function literalRepresentation
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const literalRepresentation = <T, U>(
value: T,
opts: U,
indentLevel?: number,
): number | string => {
Function convert
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ allHeaders, method, url, queryObj, postData }, options) => {
const opts = {
indent: ' ',
...options,
};
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function convert
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ method, url, queryObj, postData, headersObj, cookies }, options) => {
const opts = {
indent: ' ',
...options,
};
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function convertType
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export const convertType = (obj: any[] | any, indent?: string, lastIndent?: string) => {
lastIndent = lastIndent || '';
indent = indent || '';
switch (Object.prototype.toString.call(obj)) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function literalRepresentation
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export const literalRepresentation = (value: any, indentation?: number): string => {
const join = indentation === undefined ? ', ' : `,\n ${' '.repeat(indentation)}`;
switch (Object.prototype.toString.call(value)) {
case '[object Number]':
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function convertType
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const convertType = (obj: any[] | any, indent?: string, lastIndent?: string) => {
lastIndent = lastIndent || '';
indent = indent || '';
switch (Object.prototype.toString.call(obj)) {
Function jsToEdn
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
const jsToEdn = (js: any) => {
switch (jsType(js)) {
case 'string':
return `"${js.replace(/"/g, '\\"')}"`;
Function go
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
builder => {
builder
.option('target', {
alias: 't',
type: 'string',
Function constructor
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(input: HarEntry | HarRequest) {
let entries: Entry[] = [];
// prep the main container
this.requests = [];
Function convert
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ method, postData, allHeaders, fullUrl }, options) => {
const opts = {
indent: ' ',
short: false,
verbose: false,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function convert
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ method, url, queryObj, allHeaders, postData }, options) => {
const opts = {
indent: ' ',
...options,
};
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function generatePowershellConvert
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const generatePowershellConvert = (command: PowershellCommand) => {
const convert: Converter<any> = ({
method,
headersObj,
cookies,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function convert
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ uriObj, method, allHeaders, postData }, options = {}) => {
const { indent = ' ', insecureSkipVerify = false } = options;
const { blank, join, push, unshift } = new CodeBuilder({ indent });
const reqOpts = {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid deeply nested control flow statements. Open
if (headerName) {
delete headersObj[headerName];
}