MCPcopy
hub / github.com/axios/axios / removeBrackets

Function removeBrackets

lib/helpers/toFormData.js:30–32  ·  view source on GitHub ↗

* It removes the brackets from the end of a string * * @param {string} key - The key of the parameter. * * @returns {string} the key without the brackets.

(key)

Source from the content-addressed store, hash-verified

28 * @returns {string} the key without the brackets.
29 */
30function removeBrackets(key) {
31 return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
32}
33
34/**
35 * It takes a path, a key, and a boolean, and returns a string

Callers 2

renderKeyFunction · 0.85
defaultVisitorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected