Thanks to visit codestin.com
Credit goes to github.com

Skip to content

refactor!: Remove src/options.ts #1658

@danielbankhead

Description

@danielbankhead

It's pretty legacy at this point and we can clean up this unnecessary code.

export function validate(options: any) {
const vpairs = [
{invalid: 'uri', expected: 'url'},
{invalid: 'json', expected: 'data'},
{invalid: 'qs', expected: 'params'},
];
for (const pair of vpairs) {
if (options[pair.invalid]) {
const e = `'${pair.invalid}' is not a valid configuration option. Please use '${pair.expected}' instead. This library is using Axios for requests. Please see https://github.com/axios/axios to learn more about the valid request options.`;
throw new Error(e);
}
}
}

Metadata

Metadata

Assignees

Labels

Breaking Changegood first issueThis issue is a good place to started contributing to this repository.next major: breaking changethis is a change that we should wait to bundle into the next major versionpriority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions