Showing 52 of 282 total issues
Function convert
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ queryObj, url, postData, allHeaders, method }, options) => {
const opts = {
indent: ' ',
pretty: true,
...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 42 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ fullUrl, method, httpVersion, headersObj, allHeaders, postData }, options = {}) => {
const {
binary = false,
globOff = false,
indent = ' ',
- 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 31 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ allHeaders, postData, queryObj, fullUrl, method, url }, options) => {
const opts = {
body: false,
cert: false,
headers: 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 28 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ postData, fullUrl, method, cookies, headersObj }, options) => {
const opts = {
closingTag: false,
indent: ' ',
noTags: 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 27 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ postData, headersObj, method, queryObj, cookiesObj, url }, options = {}) => {
const { closingTag = false, indent = ' ', noTags = false, shortTags = false } = options;
const { push, blank, join } = new CodeBuilder({ indent });
let hasBody = 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 27 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ postData, method, allHeaders, fullUrl }, options = {}) => {
const { blank, push, join } = new CodeBuilder({ indent: '\t' });
const {
showBoilerplate = true,
- 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 23 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ queryObj, method, postData, url, allHeaders }, options) => {
const { push, join } = new CodeBuilder({ indent: options?.indent });
const methods = ['get', 'post', 'put', 'delete', 'patch', 'head', 'options'];
method = method.toLowerCase();
- 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 22 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ uriObj: { path, protocol, host }, postData, allHeaders, method }, options = {}) => {
const { insecureSkipVerify = false } = options;
const { push, blank, join } = new CodeBuilder();
// Start Request
- 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 19 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ method, fullUrl, 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 convert
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ method, allHeaders, postData, fullUrl }, inputOpts) => {
const opts = {
indent: ' ',
credentials: null,
...inputOpts,
- 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 16 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ allHeaders, postData, method, fullUrl }, 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 16 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ fullUrl, method, 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 convert
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ allHeaders, postData, method, fullUrl }, options) => {
const opts = {
indent: ' ',
pretty: true,
timeout: 10,
- 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 15 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ postData, allHeaders, method, fullUrl }, options) => {
const opts = {
indent: ' ',
cors: true,
...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 a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export const literalRepresentation = (
value: any,
opts: Record<string, any>,
indentLevel?: number,
): any => {
- 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 15 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ url, queryObj, queryString, postData, allHeaders, method }, options = {}) => {
// Start snippet
const { push, blank, join } = new CodeBuilder({
indent: options.indent ?? ' ',
});
- 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 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const generatePowershellConvert = (command: PowershellCommand) => {
const convert: Converter<any> = ({
method,
headersObj,
cookies,
Function convert
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ method, url, postData, queryObj, headersObj, cookiesObj }, options = {}) => {
const { closingTag = false, indent = ' ', noTags = false, shortTags = false } = options;
const { push, blank, join } = new CodeBuilder({ indent });
- 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 14 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ allHeaders, postData, fullUrl, method }, options) => {
const opts = {
indent: ' ',
pretty: true,
timeout: '10',
- 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"