id int32 0 58k | repo stringlengths 5 67 | path stringlengths 4 116 | func_name stringlengths 0 58 | original_string stringlengths 52 373k | language stringclasses 1
value | code stringlengths 52 373k | code_tokens list | docstring stringlengths 4 11.8k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 86 226 |
|---|---|---|---|---|---|---|---|---|---|---|---|
15,100 | postmanlabs/postman-collection | lib/url-pattern/url-match-pattern.js | function (port, protocol) {
var portRegex = this._matchPatternObject.port,
// default port for given protocol
defaultPort = protocol && DEFAULT_PROTOCOL_PORT[protocol];
// return true if both given port and match pattern are absent
if (typeof port === UNDEFINED && typeo... | javascript | function (port, protocol) {
var portRegex = this._matchPatternObject.port,
// default port for given protocol
defaultPort = protocol && DEFAULT_PROTOCOL_PORT[protocol];
// return true if both given port and match pattern are absent
if (typeof port === UNDEFINED && typeo... | [
"function",
"(",
"port",
",",
"protocol",
")",
"{",
"var",
"portRegex",
"=",
"this",
".",
"_matchPatternObject",
".",
"port",
",",
"// default port for given protocol",
"defaultPort",
"=",
"protocol",
"&&",
"DEFAULT_PROTOCOL_PORT",
"[",
"protocol",
"]",
";",
"// r... | Tests if the current pattern allows the given port.
@param {String} port The port to be checked if the pattern allows.
@param {String} protocol Protocol to refer default port.
@return {Boolean} | [
"Tests",
"if",
"the",
"current",
"pattern",
"allows",
"the",
"given",
"port",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/url-pattern/url-match-pattern.js#L210-L233 | |
15,101 | postmanlabs/postman-collection | lib/collection/item.js | function (key) {
// bail out if property protocolProfileBehavior is not set or key is non-string
if (!(typeof this.protocolProfileBehavior === OBJECT && typeof key === STRING)) {
return this;
}
if (this.protocolProfileBehavior.hasOwnProperty(key)) {
delete this.p... | javascript | function (key) {
// bail out if property protocolProfileBehavior is not set or key is non-string
if (!(typeof this.protocolProfileBehavior === OBJECT && typeof key === STRING)) {
return this;
}
if (this.protocolProfileBehavior.hasOwnProperty(key)) {
delete this.p... | [
"function",
"(",
"key",
")",
"{",
"// bail out if property protocolProfileBehavior is not set or key is non-string",
"if",
"(",
"!",
"(",
"typeof",
"this",
".",
"protocolProfileBehavior",
"===",
"OBJECT",
"&&",
"typeof",
"key",
"===",
"STRING",
")",
")",
"{",
"return"... | Unset or delete protocol profile behavior for the current Item.
@example <caption> Unset protocol profile behavior </caption>
item.unsetProtocolProfileBehavior('strictSSL');
@private
@param {String} key - protocol profile behavior name to unset
@returns {Item} | [
"Unset",
"or",
"delete",
"protocol",
"profile",
"behavior",
"for",
"the",
"current",
"Item",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/item.js#L264-L275 | |
15,102 | postmanlabs/postman-collection | lib/collection/item-group.js | forEachItem | function forEachItem (callback) {
this.items.each(function (item) {
return ItemGroup.isItemGroup(item) ? item.forEachItem(callback) : callback(item, this);
}, this);
} | javascript | function forEachItem (callback) {
this.items.each(function (item) {
return ItemGroup.isItemGroup(item) ? item.forEachItem(callback) : callback(item, this);
}, this);
} | [
"function",
"forEachItem",
"(",
"callback",
")",
"{",
"this",
".",
"items",
".",
"each",
"(",
"function",
"(",
"item",
")",
"{",
"return",
"ItemGroup",
".",
"isItemGroup",
"(",
"item",
")",
"?",
"item",
".",
"forEachItem",
"(",
"callback",
")",
":",
"c... | Calls the callback for each item belonging to itself. If any ItemGroups are encountered,
they will call the callback on their own Items.
@private
@param {Function} callback | [
"Calls",
"the",
"callback",
"for",
"each",
"item",
"belonging",
"to",
"itself",
".",
"If",
"any",
"ItemGroups",
"are",
"encountered",
"they",
"will",
"call",
"the",
"callback",
"on",
"their",
"own",
"Items",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/item-group.js#L194-L198 |
15,103 | postmanlabs/postman-collection | lib/collection/item-group.js | forEachItemGroup | function forEachItemGroup (callback) {
this.items.each(function (item) {
if (ItemGroup.isItemGroup(item)) {
item.forEachItemGroup(callback);
callback(item, this); // eslint-disable-line callback-return
}
}, this);
} | javascript | function forEachItemGroup (callback) {
this.items.each(function (item) {
if (ItemGroup.isItemGroup(item)) {
item.forEachItemGroup(callback);
callback(item, this); // eslint-disable-line callback-return
}
}, this);
} | [
"function",
"forEachItemGroup",
"(",
"callback",
")",
"{",
"this",
".",
"items",
".",
"each",
"(",
"function",
"(",
"item",
")",
"{",
"if",
"(",
"ItemGroup",
".",
"isItemGroup",
"(",
"item",
")",
")",
"{",
"item",
".",
"forEachItemGroup",
"(",
"callback"... | Calls the callback for each itemgroup belonging to itself. All ItemGroups encountered will also,
call the callback on their own ItemGroups
@private
@param {Function} callback | [
"Calls",
"the",
"callback",
"for",
"each",
"itemgroup",
"belonging",
"to",
"itself",
".",
"All",
"ItemGroups",
"encountered",
"will",
"also",
"call",
"the",
"callback",
"on",
"their",
"own",
"ItemGroups"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/item-group.js#L207-L214 |
15,104 | postmanlabs/postman-collection | lib/collection/item-group.js | function (idOrName) {
if (!_.isString(idOrName)) { return; }
var item;
this.items.each(function (eachItem) {
if (eachItem.id === idOrName || eachItem.name === idOrName) {
item = eachItem;
return false; // we found something, so bail out of the for lo... | javascript | function (idOrName) {
if (!_.isString(idOrName)) { return; }
var item;
this.items.each(function (eachItem) {
if (eachItem.id === idOrName || eachItem.name === idOrName) {
item = eachItem;
return false; // we found something, so bail out of the for lo... | [
"function",
"(",
"idOrName",
")",
"{",
"if",
"(",
"!",
"_",
".",
"isString",
"(",
"idOrName",
")",
")",
"{",
"return",
";",
"}",
"var",
"item",
";",
"this",
".",
"items",
".",
"each",
"(",
"function",
"(",
"eachItem",
")",
"{",
"if",
"(",
"eachIt... | Finds the first item with the given name or id in the current ItemGroup.
@param {String} idOrName | [
"Finds",
"the",
"first",
"item",
"with",
"the",
"given",
"name",
"or",
"id",
"in",
"the",
"current",
"ItemGroup",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/item-group.js#L221-L239 | |
15,105 | postmanlabs/postman-collection | lib/collection/item-group.js | function (item) {
if (Item.isItem(item) || ItemGroup.isItemGroup(item)) { return item; }
return item && item.item ? new ItemGroup(item) : new Item(item);
} | javascript | function (item) {
if (Item.isItem(item) || ItemGroup.isItemGroup(item)) { return item; }
return item && item.item ? new ItemGroup(item) : new Item(item);
} | [
"function",
"(",
"item",
")",
"{",
"if",
"(",
"Item",
".",
"isItem",
"(",
"item",
")",
"||",
"ItemGroup",
".",
"isItemGroup",
"(",
"item",
")",
")",
"{",
"return",
"item",
";",
"}",
"return",
"item",
"&&",
"item",
".",
"item",
"?",
"new",
"ItemGrou... | Iterator function to update an itemgroup's item array with appropriate objects from definition.
@private
@this {ItemGroup}
@param {Object} item - the definition of an item or group
@returns {ItemGroup|Item}
@note
This function is intended to be used in scope of an instance of a {@link ItemGroup). | [
"Iterator",
"function",
"to",
"update",
"an",
"itemgroup",
"s",
"item",
"array",
"with",
"appropriate",
"objects",
"from",
"definition",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/item-group.js#L317-L321 | |
15,106 | postmanlabs/postman-collection | lib/collection/certificate.js | function (options) {
// return early if options is empty or invalid
if (!_.isObject(options)) {
return;
}
_.mergeDefined(this, /** @lends Certificate.prototype */ {
/**
* Unique identifier
* @type {String}
*/
id:... | javascript | function (options) {
// return early if options is empty or invalid
if (!_.isObject(options)) {
return;
}
_.mergeDefined(this, /** @lends Certificate.prototype */ {
/**
* Unique identifier
* @type {String}
*/
id:... | [
"function",
"(",
"options",
")",
"{",
"// return early if options is empty or invalid",
"if",
"(",
"!",
"_",
".",
"isObject",
"(",
"options",
")",
")",
"{",
"return",
";",
"}",
"_",
".",
"mergeDefined",
"(",
"this",
",",
"/** @lends Certificate.prototype */",
"{... | Updates the certificate with the given properties.
@param {Certificate~definition=} [options] Object with matches, key, cert and passphrase | [
"Updates",
"the",
"certificate",
"with",
"the",
"given",
"properties",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/certificate.js#L75-L124 | |
15,107 | postmanlabs/postman-collection | lib/collection/certificate.js | function (url) {
if (_.isEmpty(url)) {
return false;
}
// convert url strings to Url
(typeof url === STRING) && (url = new Url(url));
// this ensures we don't proceed any further for any protocol
// that is not https
if (url.protocol !== HTTPS) {
... | javascript | function (url) {
if (_.isEmpty(url)) {
return false;
}
// convert url strings to Url
(typeof url === STRING) && (url = new Url(url));
// this ensures we don't proceed any further for any protocol
// that is not https
if (url.protocol !== HTTPS) {
... | [
"function",
"(",
"url",
")",
"{",
"if",
"(",
"_",
".",
"isEmpty",
"(",
"url",
")",
")",
"{",
"return",
"false",
";",
"}",
"// convert url strings to Url",
"(",
"typeof",
"url",
"===",
"STRING",
")",
"&&",
"(",
"url",
"=",
"new",
"Url",
"(",
"url",
... | Checks if the certificate can be applied to a given url
@param {String|Url} url The url string for which the certificate is checked for match. | [
"Checks",
"if",
"the",
"certificate",
"can",
"be",
"applied",
"to",
"a",
"given",
"url"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/certificate.js#L131-L147 | |
15,108 | postmanlabs/postman-collection | lib/collection/certificate.js | function (obj) {
return Boolean(obj) && ((obj instanceof Certificate) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', Certificate._postman_propertyName));
} | javascript | function (obj) {
return Boolean(obj) && ((obj instanceof Certificate) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', Certificate._postman_propertyName));
} | [
"function",
"(",
"obj",
")",
"{",
"return",
"Boolean",
"(",
"obj",
")",
"&&",
"(",
"(",
"obj",
"instanceof",
"Certificate",
")",
"||",
"_",
".",
"inSuperChain",
"(",
"obj",
".",
"constructor",
",",
"'_postman_propertyName'",
",",
"Certificate",
".",
"_post... | Checks if the given object is a Certificate
@param {*} obj
@returns {Boolean} | [
"Checks",
"if",
"the",
"given",
"object",
"is",
"a",
"Certificate"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/certificate.js#L189-L192 | |
15,109 | postmanlabs/postman-collection | lib/collection/property.js | function (content, type) {
(Description.isDescription(this.description) ? this.description : (this.description = new Description()))
.update(content, type);
} | javascript | function (content, type) {
(Description.isDescription(this.description) ? this.description : (this.description = new Description()))
.update(content, type);
} | [
"function",
"(",
"content",
",",
"type",
")",
"{",
"(",
"Description",
".",
"isDescription",
"(",
"this",
".",
"description",
")",
"?",
"this",
".",
"description",
":",
"(",
"this",
".",
"description",
"=",
"new",
"Description",
"(",
")",
")",
")",
"."... | This function allows to describe the property for the purpose of detailed identification or documentation
generation. This function sets or updates the `description` child-property of this property.
@param {String} content The content of the description can be provided here as a string. Note that it is expected
that i... | [
"This",
"function",
"allows",
"to",
"describe",
"the",
"property",
"for",
"the",
"purpose",
"of",
"detailed",
"identification",
"or",
"documentation",
"generation",
".",
"This",
"function",
"sets",
"or",
"updates",
"the",
"description",
"child",
"-",
"property",
... | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property.js#L139-L142 | |
15,110 | postmanlabs/postman-collection | lib/collection/property.js | function (scope, overrides, options) {
var ignoreOwnVariables = options && options.ignoreOwnVariables,
variableSourceObj,
variables,
reference;
// ensure you do not substitute variables itself!
reference = this.toJSON();
_.isArray(reference.variable) ... | javascript | function (scope, overrides, options) {
var ignoreOwnVariables = options && options.ignoreOwnVariables,
variableSourceObj,
variables,
reference;
// ensure you do not substitute variables itself!
reference = this.toJSON();
_.isArray(reference.variable) ... | [
"function",
"(",
"scope",
",",
"overrides",
",",
"options",
")",
"{",
"var",
"ignoreOwnVariables",
"=",
"options",
"&&",
"options",
".",
"ignoreOwnVariables",
",",
"variableSourceObj",
",",
"variables",
",",
"reference",
";",
"// ensure you do not substitute variables... | Returns an object representation of the Property with its variable references substituted.
@example <caption>Resolve an object using variable definitions from itself and its parents</caption>
property.toObjectResolved();
@example <caption>Resolve an object using variable definitions on a different object</caption>
pr... | [
"Returns",
"an",
"object",
"representation",
"of",
"the",
"Property",
"with",
"its",
"variable",
"references",
"substituted",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property.js#L167-L197 | |
15,111 | postmanlabs/postman-collection | lib/collection/property.js | function (str, variables) {
// if there is nothing to replace, we move on
if (!(str && _.isString(str))) { return str; }
// if variables object is not an instance of substitutor then ensure that it is an array so that it becomes
// compatible with the constructor arguments for a substit... | javascript | function (str, variables) {
// if there is nothing to replace, we move on
if (!(str && _.isString(str))) { return str; }
// if variables object is not an instance of substitutor then ensure that it is an array so that it becomes
// compatible with the constructor arguments for a substit... | [
"function",
"(",
"str",
",",
"variables",
")",
"{",
"// if there is nothing to replace, we move on",
"if",
"(",
"!",
"(",
"str",
"&&",
"_",
".",
"isString",
"(",
"str",
")",
")",
")",
"{",
"return",
"str",
";",
"}",
"// if variables object is not an instance of ... | This function accepts a string followed by a number of variable sources as arguments. One or more variable
sources can be provided and it will use the one that has the value in left-to-right order.
@param {String} str
@param {VariableList|Object|Array.<VariableList|Object>} variables
@returns {String}
@todo: improve ... | [
"This",
"function",
"accepts",
"a",
"string",
"followed",
"by",
"a",
"number",
"of",
"variable",
"sources",
"as",
"arguments",
".",
"One",
"or",
"more",
"variable",
"sources",
"can",
"be",
"provided",
"and",
"it",
"will",
"use",
"the",
"one",
"that",
"has"... | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property.js#L218-L226 | |
15,112 | postmanlabs/postman-collection | lib/collection/property.js | function (obj, variables, mutate) {
// if there is nothing to replace, we move on
if (!(obj && _.isObject(obj))) {
return obj;
}
// convert the variables to a substitutor object (will not reconvert if already substitutor)
variables = Substitutor.box(variables, Substi... | javascript | function (obj, variables, mutate) {
// if there is nothing to replace, we move on
if (!(obj && _.isObject(obj))) {
return obj;
}
// convert the variables to a substitutor object (will not reconvert if already substitutor)
variables = Substitutor.box(variables, Substi... | [
"function",
"(",
"obj",
",",
"variables",
",",
"mutate",
")",
"{",
"// if there is nothing to replace, we move on",
"if",
"(",
"!",
"(",
"obj",
"&&",
"_",
".",
"isObject",
"(",
"obj",
")",
")",
")",
"{",
"return",
"obj",
";",
"}",
"// convert the variables t... | This function accepts an object followed by a number of variable sources as arguments. One or more variable
sources can be provided and it will use the one that has the value in left-to-right order.
@param {Object} obj
@param {Array.<VariableList|Object>} variables
@param {Boolean=} [mutate=false]
@returns {Object} | [
"This",
"function",
"accepts",
"an",
"object",
"followed",
"by",
"a",
"number",
"of",
"variable",
"sources",
"as",
"arguments",
".",
"One",
"or",
"more",
"variable",
"sources",
"can",
"be",
"provided",
"and",
"it",
"will",
"use",
"the",
"one",
"that",
"has... | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property.js#L237-L260 | |
15,113 | postmanlabs/postman-collection | lib/collection/proxy-config.js | function (options) {
if (!_.isObject(options)) {
return;
}
var parsedUrl,
port = _.get(options, 'port') >> 0;
if (_.isString(options.host)) {
parsedUrl = nodeUrl.parse(options.host);
// we want to strip the protocol, but if protocol is no... | javascript | function (options) {
if (!_.isObject(options)) {
return;
}
var parsedUrl,
port = _.get(options, 'port') >> 0;
if (_.isString(options.host)) {
parsedUrl = nodeUrl.parse(options.host);
// we want to strip the protocol, but if protocol is no... | [
"function",
"(",
"options",
")",
"{",
"if",
"(",
"!",
"_",
".",
"isObject",
"(",
"options",
")",
")",
"{",
"return",
";",
"}",
"var",
"parsedUrl",
",",
"port",
"=",
"_",
".",
"get",
"(",
"options",
",",
"'port'",
")",
">>",
"0",
";",
"if",
"(",... | Updates the properties of the proxy object based on the options provided.
@param {ProxyConfig~definition} options The proxy object structure. | [
"Updates",
"the",
"properties",
"of",
"the",
"proxy",
"object",
"based",
"on",
"the",
"options",
"provided",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/proxy-config.js#L130-L153 | |
15,114 | postmanlabs/postman-collection | lib/collection/proxy-config.js | function (protocols) {
if (!protocols) {
return;
}
var updatedProtocols,
hostAndPath = _.split(this.match.pattern, PROTOCOL_HOST_SEPARATOR)[1];
if (!hostAndPath) {
return;
}
updatedProtocols = _.intersection(ALLOWED_PROTOCOLS, _.cast... | javascript | function (protocols) {
if (!protocols) {
return;
}
var updatedProtocols,
hostAndPath = _.split(this.match.pattern, PROTOCOL_HOST_SEPARATOR)[1];
if (!hostAndPath) {
return;
}
updatedProtocols = _.intersection(ALLOWED_PROTOCOLS, _.cast... | [
"function",
"(",
"protocols",
")",
"{",
"if",
"(",
"!",
"protocols",
")",
"{",
"return",
";",
"}",
"var",
"updatedProtocols",
",",
"hostAndPath",
"=",
"_",
".",
"split",
"(",
"this",
".",
"match",
".",
"pattern",
",",
"PROTOCOL_HOST_SEPARATOR",
")",
"[",... | Updates the protocols in the match pattern
@param {Array.<String>} protocols The array of protocols | [
"Updates",
"the",
"protocols",
"in",
"the",
"match",
"pattern"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/proxy-config.js#L160-L178 | |
15,115 | postmanlabs/postman-collection | lib/collection/proxy-config.js | function () {
var auth = E;
// Add authentication method to URL if the same is requested. We do it this way because
// this is how `postman-request` library accepts auth credentials in its proxy configuration.
if (this.authenticate) {
auth = (this.username || E);
... | javascript | function () {
var auth = E;
// Add authentication method to URL if the same is requested. We do it this way because
// this is how `postman-request` library accepts auth credentials in its proxy configuration.
if (this.authenticate) {
auth = (this.username || E);
... | [
"function",
"(",
")",
"{",
"var",
"auth",
"=",
"E",
";",
"// Add authentication method to URL if the same is requested. We do it this way because",
"// this is how `postman-request` library accepts auth credentials in its proxy configuration.",
"if",
"(",
"this",
".",
"authenticate",
... | Returns the proxy server url.
@returns {String} | [
"Returns",
"the",
"proxy",
"server",
"url",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/proxy-config.js#L208-L226 | |
15,116 | postmanlabs/postman-collection | lib/collection/header-list.js | function () {
if (!this.count()) { return 0; }
var raw = this.reduce(function (acc, header) {
// unparse header only if it has a valid key and is not disabled
if (header && !header.disabled) {
// *( header-field CRLF )
acc += Header.unparseSingle(... | javascript | function () {
if (!this.count()) { return 0; }
var raw = this.reduce(function (acc, header) {
// unparse header only if it has a valid key and is not disabled
if (header && !header.disabled) {
// *( header-field CRLF )
acc += Header.unparseSingle(... | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"count",
"(",
")",
")",
"{",
"return",
"0",
";",
"}",
"var",
"raw",
"=",
"this",
".",
"reduce",
"(",
"function",
"(",
"acc",
",",
"header",
")",
"{",
"// unparse header only if it has a valid key ... | Gets size of a list of headers excluding standard header prefix.
@returns {Number} | [
"Gets",
"size",
"of",
"a",
"list",
"of",
"headers",
"excluding",
"standard",
"header",
"prefix",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/header-list.js#L32-L46 | |
15,117 | postmanlabs/postman-collection | lib/collection/header-list.js | function (obj) {
return Boolean(obj) && ((obj instanceof HeaderList) ||
_.inSuperChain(obj.constructor, PROP_NAME, HeaderList._postman_propertyName));
} | javascript | function (obj) {
return Boolean(obj) && ((obj instanceof HeaderList) ||
_.inSuperChain(obj.constructor, PROP_NAME, HeaderList._postman_propertyName));
} | [
"function",
"(",
"obj",
")",
"{",
"return",
"Boolean",
"(",
"obj",
")",
"&&",
"(",
"(",
"obj",
"instanceof",
"HeaderList",
")",
"||",
"_",
".",
"inSuperChain",
"(",
"obj",
".",
"constructor",
",",
"PROP_NAME",
",",
"HeaderList",
".",
"_postman_propertyName... | Checks if the given object is a HeaderList
@param {*} obj
@returns {Boolean} | [
"Checks",
"if",
"the",
"given",
"object",
"is",
"a",
"HeaderList"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/header-list.js#L64-L67 | |
15,118 | postmanlabs/postman-collection | lib/collection/event.js | function (definition) {
if (!definition) {
return;
}
var result,
script = definition.script;
if (Script.isScript(script)) {
result = script;
}
else if (_.isArray(script) || _.isString(script)) {
result = new Script({ exec:... | javascript | function (definition) {
if (!definition) {
return;
}
var result,
script = definition.script;
if (Script.isScript(script)) {
result = script;
}
else if (_.isArray(script) || _.isString(script)) {
result = new Script({ exec:... | [
"function",
"(",
"definition",
")",
"{",
"if",
"(",
"!",
"definition",
")",
"{",
"return",
";",
"}",
"var",
"result",
",",
"script",
"=",
"definition",
".",
"script",
";",
"if",
"(",
"Script",
".",
"isScript",
"(",
"script",
")",
")",
"{",
"result",
... | Update an event.
@param {Event~definition} definition | [
"Update",
"an",
"event",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/event.js#L45-L76 | |
15,119 | postmanlabs/postman-collection | lib/collection/description.js | function (content, type) {
_.isObject(content) && ((type = content.type), (content = content.content));
_.assign(this, /** @lends Description.prototype */ {
/**
* The raw content of the description
*
* @type {String}
*/
content:... | javascript | function (content, type) {
_.isObject(content) && ((type = content.type), (content = content.content));
_.assign(this, /** @lends Description.prototype */ {
/**
* The raw content of the description
*
* @type {String}
*/
content:... | [
"function",
"(",
"content",
",",
"type",
")",
"{",
"_",
".",
"isObject",
"(",
"content",
")",
"&&",
"(",
"(",
"type",
"=",
"content",
".",
"type",
")",
",",
"(",
"content",
"=",
"content",
".",
"content",
")",
")",
";",
"_",
".",
"assign",
"(",
... | Updates the content of this description property.
@param {String|Description~definition} content
@param {String=} [type]
@todo parse version of description | [
"Updates",
"the",
"content",
"of",
"this",
"description",
"property",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/description.js#L88-L105 | |
15,120 | postmanlabs/postman-collection | lib/collection/description.js | function (obj) {
return Boolean(obj) && ((obj instanceof Description) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', Description._postman_propertyName));
} | javascript | function (obj) {
return Boolean(obj) && ((obj instanceof Description) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', Description._postman_propertyName));
} | [
"function",
"(",
"obj",
")",
"{",
"return",
"Boolean",
"(",
"obj",
")",
"&&",
"(",
"(",
"obj",
"instanceof",
"Description",
")",
"||",
"_",
".",
"inSuperChain",
"(",
"obj",
".",
"constructor",
",",
"'_postman_propertyName'",
",",
"Description",
".",
"_post... | Checks whether a property is an instance of Description object.
@param {*} obj
@returns {Boolean} | [
"Checks",
"whether",
"a",
"property",
"is",
"an",
"instance",
"of",
"Description",
"object",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/description.js#L182-L185 | |
15,121 | postmanlabs/postman-collection | lib/collection/event-list.js | function (name) {
var all;
// we first procure all matching events from this list
all = this.listenersOwn(name);
this.eachParent(function (parent) {
var parentEvents;
// we check that the parent is not immediate mother. then we check whether the non immediate m... | javascript | function (name) {
var all;
// we first procure all matching events from this list
all = this.listenersOwn(name);
this.eachParent(function (parent) {
var parentEvents;
// we check that the parent is not immediate mother. then we check whether the non immediate m... | [
"function",
"(",
"name",
")",
"{",
"var",
"all",
";",
"// we first procure all matching events from this list",
"all",
"=",
"this",
".",
"listenersOwn",
"(",
"name",
")",
";",
"this",
".",
"eachParent",
"(",
"function",
"(",
"parent",
")",
"{",
"var",
"parentE... | Returns an array of listeners filtered by the listener name
@note
If one needs to access disabled events, use {@link PropertyList#all} or
any other similar {@link PropertyList} method.
@param {String} name
@returns {Array<Event>} | [
"Returns",
"an",
"array",
"of",
"listeners",
"filtered",
"by",
"the",
"listener",
"name"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/event-list.js#L36-L54 | |
15,122 | postmanlabs/postman-collection | lib/collection/event-list.js | function (obj) {
return Boolean(obj) && ((obj instanceof EventList) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', EventList._postman_propertyName));
} | javascript | function (obj) {
return Boolean(obj) && ((obj instanceof EventList) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', EventList._postman_propertyName));
} | [
"function",
"(",
"obj",
")",
"{",
"return",
"Boolean",
"(",
"obj",
")",
"&&",
"(",
"(",
"obj",
"instanceof",
"EventList",
")",
"||",
"_",
".",
"inSuperChain",
"(",
"obj",
".",
"constructor",
",",
"'_postman_propertyName'",
",",
"EventList",
".",
"_postman_... | Checks if the given object is an EventList.
@param {*} obj
@returns {boolean} | [
"Checks",
"if",
"the",
"given",
"object",
"is",
"an",
"EventList",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/event-list.js#L85-L88 | |
15,123 | postmanlabs/postman-collection | lib/collection/header.js | function (options) {
/**
* The header Key
* @type {String}
* @todo avoid headers with falsy key.
*/
this.key = _.get(options, 'key') || E;
/**
* The header value
* @type {String}
*/
this.value = _.get(options, 'value') || E;... | javascript | function (options) {
/**
* The header Key
* @type {String}
* @todo avoid headers with falsy key.
*/
this.key = _.get(options, 'key') || E;
/**
* The header value
* @type {String}
*/
this.value = _.get(options, 'value') || E;... | [
"function",
"(",
"options",
")",
"{",
"/**\n * The header Key\n * @type {String}\n * @todo avoid headers with falsy key.\n */",
"this",
".",
"key",
"=",
"_",
".",
"get",
"(",
"options",
",",
"'key'",
")",
"||",
"E",
";",
"/**\n * The ... | Assigns the given properties to the Header
@param {Object} options
@todo check for allowed characters in header key-value or store encoded. | [
"Assigns",
"the",
"given",
"properties",
"to",
"the",
"Header"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/header.js#L102-L128 | |
15,124 | postmanlabs/postman-collection | lib/collection/header.js | function (header) {
if (!_.isString(header)) { return { key: E, value: E }; }
var index = header.indexOf(HEADER_KV_SEPARATOR),
key,
value;
(index < 0) && (index = header.length);
key = header.substr(0, index);
value = header.substr(index + 1);
... | javascript | function (header) {
if (!_.isString(header)) { return { key: E, value: E }; }
var index = header.indexOf(HEADER_KV_SEPARATOR),
key,
value;
(index < 0) && (index = header.length);
key = header.substr(0, index);
value = header.substr(index + 1);
... | [
"function",
"(",
"header",
")",
"{",
"if",
"(",
"!",
"_",
".",
"isString",
"(",
"header",
")",
")",
"{",
"return",
"{",
"key",
":",
"E",
",",
"value",
":",
"E",
"}",
";",
"}",
"var",
"index",
"=",
"header",
".",
"indexOf",
"(",
"HEADER_KV_SEPARAT... | Parses a single Header.
@param {String} header
@returns {{key: string, value: string}} | [
"Parses",
"a",
"single",
"Header",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/header.js#L198-L214 | |
15,125 | postmanlabs/postman-collection | lib/collection/header.js | function (header) {
if (!_.isObject(header)) { return E; }
return header.key + HEADER_KV_SEPARATOR + SPC + header.value;
} | javascript | function (header) {
if (!_.isObject(header)) { return E; }
return header.key + HEADER_KV_SEPARATOR + SPC + header.value;
} | [
"function",
"(",
"header",
")",
"{",
"if",
"(",
"!",
"_",
".",
"isObject",
"(",
"header",
")",
")",
"{",
"return",
"E",
";",
"}",
"return",
"header",
".",
"key",
"+",
"HEADER_KV_SEPARATOR",
"+",
"SPC",
"+",
"header",
".",
"value",
";",
"}"
] | Unparses a single Header.
@param {String} header
@returns {String} | [
"Unparses",
"a",
"single",
"Header",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/header.js#L238-L241 | |
15,126 | postmanlabs/postman-collection | lib/collection/header.js | function (obj) {
return Boolean(obj) && ((obj instanceof Header) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', Header._postman_propertyName));
} | javascript | function (obj) {
return Boolean(obj) && ((obj instanceof Header) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', Header._postman_propertyName));
} | [
"function",
"(",
"obj",
")",
"{",
"return",
"Boolean",
"(",
"obj",
")",
"&&",
"(",
"(",
"obj",
"instanceof",
"Header",
")",
"||",
"_",
".",
"inSuperChain",
"(",
"obj",
".",
"constructor",
",",
"'_postman_propertyName'",
",",
"Header",
".",
"_postman_proper... | Check whether an object is an instance of PostmanHeader.
@param {*} obj
@returns {Boolean} | [
"Check",
"whether",
"an",
"object",
"is",
"an",
"instance",
"of",
"PostmanHeader",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/header.js#L249-L252 | |
15,127 | postmanlabs/postman-collection | lib/collection/variable.js | function () {
var value = this.valueOf();
// returns empty string if the value is
// null or undefined or does not implement a toString
return (!_.isNil(value) && _.isFunction(value.toString)) ? value.toString() : E;
} | javascript | function () {
var value = this.valueOf();
// returns empty string if the value is
// null or undefined or does not implement a toString
return (!_.isNil(value) && _.isFunction(value.toString)) ? value.toString() : E;
} | [
"function",
"(",
")",
"{",
"var",
"value",
"=",
"this",
".",
"valueOf",
"(",
")",
";",
"// returns empty string if the value is",
"// null or undefined or does not implement a toString",
"return",
"(",
"!",
"_",
".",
"isNil",
"(",
"value",
")",
"&&",
"_",
".",
"... | Returns the stringified value of the variable.
@returns {String} | [
"Returns",
"the",
"stringified",
"value",
"of",
"the",
"variable",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/variable.js#L109-L115 | |
15,128 | postmanlabs/postman-collection | lib/collection/variable.js | function (typeName, _noCast) {
!_.isNil(typeName) && (typeName = typeName.toString().toLowerCase()); // sanitize
if (!Variable.types[typeName]) {
return this.type || ANY; // @todo: throw new Error('Invalid variable type.');
}
// set type if it is valid
this.type = ty... | javascript | function (typeName, _noCast) {
!_.isNil(typeName) && (typeName = typeName.toString().toLowerCase()); // sanitize
if (!Variable.types[typeName]) {
return this.type || ANY; // @todo: throw new Error('Invalid variable type.');
}
// set type if it is valid
this.type = ty... | [
"function",
"(",
"typeName",
",",
"_noCast",
")",
"{",
"!",
"_",
".",
"isNil",
"(",
"typeName",
")",
"&&",
"(",
"typeName",
"=",
"typeName",
".",
"toString",
"(",
")",
".",
"toLowerCase",
"(",
")",
")",
";",
"// sanitize",
"if",
"(",
"!",
"Variable",... | Sets or gets the type of the value.
@param {String} typeName
@param {Boolean} _noCast
@returns {String} - returns the current type of the variable from the list of {@link Variable.types} | [
"Sets",
"or",
"gets",
"the",
"type",
"of",
"the",
"value",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/variable.js#L161-L183 | |
15,129 | postmanlabs/postman-collection | lib/collection/variable.js | function (options) {
if (!_.isObject(options)) {
return;
}
// set type and value.
// @note that we cannot update the key, once created during construction
options.hasOwnProperty('type') && this.valueType(options.type, options.hasOwnProperty('value'));
options.... | javascript | function (options) {
if (!_.isObject(options)) {
return;
}
// set type and value.
// @note that we cannot update the key, once created during construction
options.hasOwnProperty('type') && this.valueType(options.type, options.hasOwnProperty('value'));
options.... | [
"function",
"(",
"options",
")",
"{",
"if",
"(",
"!",
"_",
".",
"isObject",
"(",
"options",
")",
")",
"{",
"return",
";",
"}",
"// set type and value.",
"// @note that we cannot update the key, once created during construction",
"options",
".",
"hasOwnProperty",
"(",
... | Updates the type and value of a variable from an object or JSON definition of the variable.
@param {Variable~definition} options | [
"Updates",
"the",
"type",
"and",
"value",
"of",
"a",
"variable",
"from",
"an",
"object",
"or",
"JSON",
"definition",
"of",
"the",
"variable",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/variable.js#L190-L200 | |
15,130 | postmanlabs/postman-collection | lib/collection/variable.js | function (val) {
var value;
try {
value = JSON.parse(val);
}
catch (e) {
value = undefined;
}
return Array.isArray(value) ? value : undefined;
} | javascript | function (val) {
var value;
try {
value = JSON.parse(val);
}
catch (e) {
value = undefined;
}
return Array.isArray(value) ? value : undefined;
} | [
"function",
"(",
"val",
")",
"{",
"var",
"value",
";",
"try",
"{",
"value",
"=",
"JSON",
".",
"parse",
"(",
"val",
")",
";",
"}",
"catch",
"(",
"e",
")",
"{",
"value",
"=",
"undefined",
";",
"}",
"return",
"Array",
".",
"isArray",
"(",
"value",
... | A "array" type value stores Array data format
@param {String} val
@returns {Object} | [
"A",
"array",
"type",
"value",
"stores",
"Array",
"data",
"format"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/variable.js#L314-L325 | |
15,131 | postmanlabs/postman-collection | lib/collection/cookie-list.js | function (obj) {
return Boolean(obj) && ((obj instanceof CookieList) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', CookieList._postman_propertyName));
} | javascript | function (obj) {
return Boolean(obj) && ((obj instanceof CookieList) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', CookieList._postman_propertyName));
} | [
"function",
"(",
"obj",
")",
"{",
"return",
"Boolean",
"(",
"obj",
")",
"&&",
"(",
"(",
"obj",
"instanceof",
"CookieList",
")",
"||",
"_",
".",
"inSuperChain",
"(",
"obj",
".",
"constructor",
",",
"'_postman_propertyName'",
",",
"CookieList",
".",
"_postma... | Checks if the given object is a CookieList
@param {*} obj
@returns {Boolean} | [
"Checks",
"if",
"the",
"given",
"object",
"is",
"a",
"CookieList"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/cookie-list.js#L40-L43 | |
15,132 | postmanlabs/postman-collection | lib/collection/version.js | function (value) {
// extract the version logic and in case it failes and value passed is an object, we use that assuming parsed
// value has been sent.
var ver = semver.parse(value) || value || {};
_.assign(this, /** @lends Version.prototype */ {
/**
* The raw ... | javascript | function (value) {
// extract the version logic and in case it failes and value passed is an object, we use that assuming parsed
// value has been sent.
var ver = semver.parse(value) || value || {};
_.assign(this, /** @lends Version.prototype */ {
/**
* The raw ... | [
"function",
"(",
"value",
")",
"{",
"// extract the version logic and in case it failes and value passed is an object, we use that assuming parsed",
"// value has been sent.",
"var",
"ver",
"=",
"semver",
".",
"parse",
"(",
"value",
")",
"||",
"value",
"||",
"{",
"}",
";",
... | Set the version value as string or object with separate components of version
@draft
@param {object|string} value | [
"Set",
"the",
"version",
"value",
"as",
"string",
"or",
"object",
"with",
"separate",
"components",
"of",
"version"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/version.js#L31-L75 | |
15,133 | postmanlabs/postman-collection | lib/collection/property-base.js | function (options, iterator) {
_.isFunction(options) && (iterator = options, options = {});
if (!_.isFunction(iterator) || !_.isObject(options)) { return; }
var parent = this.parent(),
grandparent = parent && _.isFunction(parent.parent) && parent.parent();
while (parent && ... | javascript | function (options, iterator) {
_.isFunction(options) && (iterator = options, options = {});
if (!_.isFunction(iterator) || !_.isObject(options)) { return; }
var parent = this.parent(),
grandparent = parent && _.isFunction(parent.parent) && parent.parent();
while (parent && ... | [
"function",
"(",
"options",
",",
"iterator",
")",
"{",
"_",
".",
"isFunction",
"(",
"options",
")",
"&&",
"(",
"iterator",
"=",
"options",
",",
"options",
"=",
"{",
"}",
")",
";",
"if",
"(",
"!",
"_",
".",
"isFunction",
"(",
"iterator",
")",
"||",
... | Invokes the given iterator for every parent in the parent chain of the given element.
@param {?Object|Boolean} [options={}] - A set of options for the parent chain traversal.
@param {?Boolean} [options.withRoot=false] - Set to true to include the collection object as well.
@param {Function} iterator - The function to ... | [
"Invokes",
"the",
"given",
"iterator",
"for",
"every",
"parent",
"in",
"the",
"parent",
"chain",
"of",
"the",
"given",
"element",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-base.js#L45-L57 | |
15,134 | postmanlabs/postman-collection | lib/collection/property-base.js | function (property, customizer) {
var owner = this.findParentContaining(property, customizer);
return owner ? owner[property] : undefined;
} | javascript | function (property, customizer) {
var owner = this.findParentContaining(property, customizer);
return owner ? owner[property] : undefined;
} | [
"function",
"(",
"property",
",",
"customizer",
")",
"{",
"var",
"owner",
"=",
"this",
".",
"findParentContaining",
"(",
"property",
",",
"customizer",
")",
";",
"return",
"owner",
"?",
"owner",
"[",
"property",
"]",
":",
"undefined",
";",
"}"
] | Tries to find the given property locally, and then proceeds to lookup in each parent,
going up the chain as necessary. Lookup will continue until `customizer` returns a truthy value. If used
without a customizer, the lookup will stop at the first parent that contains the property.
@param {String} property
@param {Func... | [
"Tries",
"to",
"find",
"the",
"given",
"property",
"locally",
"and",
"then",
"proceeds",
"to",
"lookup",
"in",
"each",
"parent",
"going",
"up",
"the",
"chain",
"as",
"necessary",
".",
"Lookup",
"will",
"continue",
"until",
"customizer",
"returns",
"a",
"trut... | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-base.js#L69-L72 | |
15,135 | postmanlabs/postman-collection | lib/collection/property-base.js | function (property, customizer) {
var parent = this;
// if customizer is present test with it
if (customizer) {
customizer = customizer.bind(this);
do {
// else check for existence
if (customizer(parent)) {
return pare... | javascript | function (property, customizer) {
var parent = this;
// if customizer is present test with it
if (customizer) {
customizer = customizer.bind(this);
do {
// else check for existence
if (customizer(parent)) {
return pare... | [
"function",
"(",
"property",
",",
"customizer",
")",
"{",
"var",
"parent",
"=",
"this",
";",
"// if customizer is present test with it",
"if",
"(",
"customizer",
")",
"{",
"customizer",
"=",
"customizer",
".",
"bind",
"(",
"this",
")",
";",
"do",
"{",
"// el... | Looks up the closest parent which has a truthy value for the given property. Lookup will continue
until `customizer` returns a truthy value. If used without a customizer,
the lookup will stop at the first parent that contains the property.
@param {String} property
@param {Function} [customizer]
@returns {PropertyBase... | [
"Looks",
"up",
"the",
"closest",
"parent",
"which",
"has",
"a",
"truthy",
"value",
"for",
"the",
"given",
"property",
".",
"Lookup",
"will",
"continue",
"until",
"customizer",
"returns",
"a",
"truthy",
"value",
".",
"If",
"used",
"without",
"a",
"customizer"... | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-base.js#L85-L112 | |
15,136 | postmanlabs/postman-collection | lib/collection/property-base.js | function () {
return arguments.length ? _.pick(this._, Array.prototype.slice.apply(arguments)) : _.cloneDeep(this._);
} | javascript | function () {
return arguments.length ? _.pick(this._, Array.prototype.slice.apply(arguments)) : _.cloneDeep(this._);
} | [
"function",
"(",
")",
"{",
"return",
"arguments",
".",
"length",
"?",
"_",
".",
"pick",
"(",
"this",
".",
"_",
",",
"Array",
".",
"prototype",
".",
"slice",
".",
"apply",
"(",
"arguments",
")",
")",
":",
"_",
".",
"cloneDeep",
"(",
"this",
".",
"... | Returns the meta keys associated with the property
@returns {*} | [
"Returns",
"the",
"meta",
"keys",
"associated",
"with",
"the",
"property"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-base.js#L154-L156 | |
15,137 | postmanlabs/postman-collection | lib/collection/script.js | function (options) {
// no splitting is being done here, as string scripts are split right before assignment below anyway
(_.isString(options) || _.isArray(options)) && (options = { exec: options });
if (!options) { return; } // in case definition object is missing, there is no point moving for... | javascript | function (options) {
// no splitting is being done here, as string scripts are split right before assignment below anyway
(_.isString(options) || _.isArray(options)) && (options = { exec: options });
if (!options) { return; } // in case definition object is missing, there is no point moving for... | [
"function",
"(",
"options",
")",
"{",
"// no splitting is being done here, as string scripts are split right before assignment below anyway",
"(",
"_",
".",
"isString",
"(",
"options",
")",
"||",
"_",
".",
"isArray",
"(",
"options",
")",
")",
"&&",
"(",
"options",
"="... | Updates the properties of a Script.
@param {Object} [options]
@param {String} [options.type] Script type
@param {String} [options.src] Script source url
@param {String[]|String} [options.exec] Script to execute | [
"Updates",
"the",
"properties",
"of",
"a",
"Script",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/script.js#L52-L81 | |
15,138 | postmanlabs/postman-collection | lib/collection/proxy-config-list.js | function (url) {
// url must be either string or an instance of url.
if (!_.isString(url) && !Url.isUrl(url)) {
return;
}
// @todo - use a fixed-length cacheing of regexes in future
return this.find(function (proxyConfig) {
return !proxyConfig.disabled &&... | javascript | function (url) {
// url must be either string or an instance of url.
if (!_.isString(url) && !Url.isUrl(url)) {
return;
}
// @todo - use a fixed-length cacheing of regexes in future
return this.find(function (proxyConfig) {
return !proxyConfig.disabled &&... | [
"function",
"(",
"url",
")",
"{",
"// url must be either string or an instance of url.",
"if",
"(",
"!",
"_",
".",
"isString",
"(",
"url",
")",
"&&",
"!",
"Url",
".",
"isUrl",
"(",
"url",
")",
")",
"{",
"return",
";",
"}",
"// @todo - use a fixed-length cachei... | Matches and gets the proxy config for the particular url.
@returns {ProxyConfig~definition} The matched proxyConfig object
@param {URL=} [url] The url for which the proxy config needs to be fetched | [
"Matches",
"and",
"gets",
"the",
"proxy",
"config",
"for",
"the",
"particular",
"url",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/proxy-config-list.js#L37-L48 | |
15,139 | postmanlabs/postman-collection | lib/collection/proxy-config-list.js | function (obj) {
return Boolean(obj) && ((obj instanceof ProxyConfigList) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', ProxyConfigList._postman_propertyName));
} | javascript | function (obj) {
return Boolean(obj) && ((obj instanceof ProxyConfigList) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', ProxyConfigList._postman_propertyName));
} | [
"function",
"(",
"obj",
")",
"{",
"return",
"Boolean",
"(",
"obj",
")",
"&&",
"(",
"(",
"obj",
"instanceof",
"ProxyConfigList",
")",
"||",
"_",
".",
"inSuperChain",
"(",
"obj",
".",
"constructor",
",",
"'_postman_propertyName'",
",",
"ProxyConfigList",
".",
... | Checks whether an object is a ProxyConfigList
@param {*} obj
@returns {Boolean} | [
"Checks",
"whether",
"an",
"object",
"is",
"a",
"ProxyConfigList"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/proxy-config-list.js#L68-L71 | |
15,140 | postmanlabs/postman-collection | lib/collection/property-list.js | function (item, before) {
if (!_.isObject(item)) { return; } // do not proceed on empty param
var duplicate = this.indexOf(item),
index;
// remove from previous list
PropertyList.isPropertyList(item[__PARENT]) && (item[__PARENT] !== this) && item[__PARENT].remove(item);
... | javascript | function (item, before) {
if (!_.isObject(item)) { return; } // do not proceed on empty param
var duplicate = this.indexOf(item),
index;
// remove from previous list
PropertyList.isPropertyList(item[__PARENT]) && (item[__PARENT] !== this) && item[__PARENT].remove(item);
... | [
"function",
"(",
"item",
",",
"before",
")",
"{",
"if",
"(",
"!",
"_",
".",
"isObject",
"(",
"item",
")",
")",
"{",
"return",
";",
"}",
"// do not proceed on empty param",
"var",
"duplicate",
"=",
"this",
".",
"indexOf",
"(",
"item",
")",
",",
"index",... | Insert an element at the end of this list. When a reference member specified via second parameter is found, the
member is inserted at an index before the reference member.
@param {PropertyList.Type} item
@param {PropertyList.Type|String} [before] | [
"Insert",
"an",
"element",
"at",
"the",
"end",
"of",
"this",
"list",
".",
"When",
"a",
"reference",
"member",
"specified",
"via",
"second",
"parameter",
"is",
"found",
"the",
"member",
"is",
"inserted",
"at",
"an",
"index",
"before",
"the",
"reference",
"m... | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L103-L141 | |
15,141 | postmanlabs/postman-collection | lib/collection/property-list.js | function (item) {
// do not proceed on empty param, but empty strings are in fact valid.
// eslint-disable-next-line lodash/prefer-is-nil
if (_.isNull(item) || _.isUndefined(item) || _.isNaN(item)) { return; }
// create new instance of the item based on the type specified if it is not a... | javascript | function (item) {
// do not proceed on empty param, but empty strings are in fact valid.
// eslint-disable-next-line lodash/prefer-is-nil
if (_.isNull(item) || _.isUndefined(item) || _.isNaN(item)) { return; }
// create new instance of the item based on the type specified if it is not a... | [
"function",
"(",
"item",
")",
"{",
"// do not proceed on empty param, but empty strings are in fact valid.",
"// eslint-disable-next-line lodash/prefer-is-nil",
"if",
"(",
"_",
".",
"isNull",
"(",
"item",
")",
"||",
"_",
".",
"isUndefined",
"(",
"item",
")",
"||",
"_",
... | Add an item or item definition to this list.
@param {Object|PropertyList.Type} item
@todo
- remove item from original parent if already it has a parent
- validate that the original parent's constructor matches this parent's constructor | [
"Add",
"an",
"item",
"or",
"item",
"definition",
"to",
"this",
"list",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L181-L191 | |
15,142 | postmanlabs/postman-collection | lib/collection/property-list.js | function (item) {
// do not proceed on empty param, but empty strings are in fact valid.
if (_.isNil(item) || _.isNaN(item)) { return null; }
var indexer = this._postman_listIndexKey,
existing = this.one(item[indexer]);
if (existing) {
if (!_.isFunction(existing... | javascript | function (item) {
// do not proceed on empty param, but empty strings are in fact valid.
if (_.isNil(item) || _.isNaN(item)) { return null; }
var indexer = this._postman_listIndexKey,
existing = this.one(item[indexer]);
if (existing) {
if (!_.isFunction(existing... | [
"function",
"(",
"item",
")",
"{",
"// do not proceed on empty param, but empty strings are in fact valid.",
"if",
"(",
"_",
".",
"isNil",
"(",
"item",
")",
"||",
"_",
".",
"isNaN",
"(",
"item",
")",
")",
"{",
"return",
"null",
";",
"}",
"var",
"indexer",
"=... | Add an item or update an existing item
@param {PropertyList~Type} item
@returns {?Boolean} | [
"Add",
"an",
"item",
"or",
"update",
"an",
"existing",
"item"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L200-L218 | |
15,143 | postmanlabs/postman-collection | lib/collection/property-list.js | function (predicate, context) {
var match; // to be used if predicate is an ID
!context && (context = this);
if (_.isString(predicate)) {
// if predicate is id, then create a function to remove that
// need to take care of case sensitivity as well :/
match =... | javascript | function (predicate, context) {
var match; // to be used if predicate is an ID
!context && (context = this);
if (_.isString(predicate)) {
// if predicate is id, then create a function to remove that
// need to take care of case sensitivity as well :/
match =... | [
"function",
"(",
"predicate",
",",
"context",
")",
"{",
"var",
"match",
";",
"// to be used if predicate is an ID",
"!",
"context",
"&&",
"(",
"context",
"=",
"this",
")",
";",
"if",
"(",
"_",
".",
"isString",
"(",
"predicate",
")",
")",
"{",
"// if predic... | Removes all elements from the PropertyList for which the predicate returns truthy.
@param {Function|String|Type} predicate
@param {Object} context Optional context to bind the predicate to. | [
"Removes",
"all",
"elements",
"from",
"the",
"PropertyList",
"for",
"which",
"the",
"predicate",
"returns",
"truthy",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L226-L277 | |
15,144 | postmanlabs/postman-collection | lib/collection/property-list.js | function () {
// we unlink every member from it's parent (assuming this is their parent)
this.all().forEach(PropertyList._unlinkItemFromParent);
this.members.length = 0; // remove all items from list
// now we remove all items from index reference
Object.keys(this.reference).fo... | javascript | function () {
// we unlink every member from it's parent (assuming this is their parent)
this.all().forEach(PropertyList._unlinkItemFromParent);
this.members.length = 0; // remove all items from list
// now we remove all items from index reference
Object.keys(this.reference).fo... | [
"function",
"(",
")",
"{",
"// we unlink every member from it's parent (assuming this is their parent)",
"this",
".",
"all",
"(",
")",
".",
"forEach",
"(",
"PropertyList",
".",
"_unlinkItemFromParent",
")",
";",
"this",
".",
"members",
".",
"length",
"=",
"0",
";",
... | Removes all items in the list | [
"Removes",
"all",
"items",
"in",
"the",
"list"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L282-L292 | |
15,145 | postmanlabs/postman-collection | lib/collection/property-list.js | function (items) {
// if Type supports parsing of string headers then do it before adding it.
_.isString(items) && _.isFunction(this.Type.parse) && (items = this.Type.parse(items));
// add a single item or an array of items.
_.forEach(_.isArray(items) ? items :
// if populati... | javascript | function (items) {
// if Type supports parsing of string headers then do it before adding it.
_.isString(items) && _.isFunction(this.Type.parse) && (items = this.Type.parse(items));
// add a single item or an array of items.
_.forEach(_.isArray(items) ? items :
// if populati... | [
"function",
"(",
"items",
")",
"{",
"// if Type supports parsing of string headers then do it before adding it.",
"_",
".",
"isString",
"(",
"items",
")",
"&&",
"_",
".",
"isFunction",
"(",
"this",
".",
"Type",
".",
"parse",
")",
"&&",
"(",
"items",
"=",
"this",... | Load one or more items
@param {Object|Array} items | [
"Load",
"one",
"or",
"more",
"items"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L299-L307 | |
15,146 | postmanlabs/postman-collection | lib/collection/property-list.js | function (source, prune) {
var members = PropertyList.isPropertyList(source) ? source.members : source,
list = this,
indexer = list._postman_listIndexKey,
sourceKeys = {}; // keeps track of added / updated keys for later exclusion
if (!_.isArray(members)) {
... | javascript | function (source, prune) {
var members = PropertyList.isPropertyList(source) ? source.members : source,
list = this,
indexer = list._postman_listIndexKey,
sourceKeys = {}; // keeps track of added / updated keys for later exclusion
if (!_.isArray(members)) {
... | [
"function",
"(",
"source",
",",
"prune",
")",
"{",
"var",
"members",
"=",
"PropertyList",
".",
"isPropertyList",
"(",
"source",
")",
"?",
"source",
".",
"members",
":",
"source",
",",
"list",
"=",
"this",
",",
"indexer",
"=",
"list",
".",
"_postman_listI... | Add or update values from a source list.
@param {PropertyList|Array} source
@param {Boolean} [prune=false] Setting this to `true` will cause the extra items from the list to be deleted | [
"Add",
"or",
"update",
"values",
"from",
"a",
"source",
"list",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L325-L350 | |
15,147 | postmanlabs/postman-collection | lib/collection/property-list.js | function (id) {
var val = this.reference[this._postman_listIndexCaseInsensitive ? String(id).toLowerCase() : id];
if (this._postman_listAllowsMultipleValues && Array.isArray(val)) {
return val.length ? val[val.length - 1] : undefined;
}
return val;
} | javascript | function (id) {
var val = this.reference[this._postman_listIndexCaseInsensitive ? String(id).toLowerCase() : id];
if (this._postman_listAllowsMultipleValues && Array.isArray(val)) {
return val.length ? val[val.length - 1] : undefined;
}
return val;
} | [
"function",
"(",
"id",
")",
"{",
"var",
"val",
"=",
"this",
".",
"reference",
"[",
"this",
".",
"_postman_listIndexCaseInsensitive",
"?",
"String",
"(",
"id",
")",
".",
"toLowerCase",
"(",
")",
":",
"id",
"]",
";",
"if",
"(",
"this",
".",
"_postman_lis... | Get Item in this list by `ID` reference. If multiple values are allowed, the last value is returned.
@param {String} id
@returns {PropertyList.Type} | [
"Get",
"Item",
"in",
"this",
"list",
"by",
"ID",
"reference",
".",
"If",
"multiple",
"values",
"are",
"allowed",
"the",
"last",
"value",
"is",
"returned",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L367-L375 | |
15,148 | postmanlabs/postman-collection | lib/collection/property-list.js | function (iterator, context) {
_.forEach(this.members, _.isFunction(iterator) ? iterator.bind(context || this.__parent) : iterator);
} | javascript | function (iterator, context) {
_.forEach(this.members, _.isFunction(iterator) ? iterator.bind(context || this.__parent) : iterator);
} | [
"function",
"(",
"iterator",
",",
"context",
")",
"{",
"_",
".",
"forEach",
"(",
"this",
".",
"members",
",",
"_",
".",
"isFunction",
"(",
"iterator",
")",
"?",
"iterator",
".",
"bind",
"(",
"context",
"||",
"this",
".",
"__parent",
")",
":",
"iterat... | Iterate on each item of this list.
@param {Function} iterator
@param {Object} context | [
"Iterate",
"on",
"each",
"item",
"of",
"this",
"list",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L397-L399 | |
15,149 | postmanlabs/postman-collection | lib/collection/property-list.js | function (rule, context) {
return _.find(this.members, _.isFunction(rule) && _.isObject(context) ? rule.bind(context) : rule);
} | javascript | function (rule, context) {
return _.find(this.members, _.isFunction(rule) && _.isObject(context) ? rule.bind(context) : rule);
} | [
"function",
"(",
"rule",
",",
"context",
")",
"{",
"return",
"_",
".",
"find",
"(",
"this",
".",
"members",
",",
"_",
".",
"isFunction",
"(",
"rule",
")",
"&&",
"_",
".",
"isObject",
"(",
"context",
")",
"?",
"rule",
".",
"bind",
"(",
"context",
... | Find an item within the item group
@param {Function} rule
@param {Object} [context]
@returns {Item|ItemGroup} | [
"Find",
"an",
"item",
"within",
"the",
"item",
"group"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L416-L418 | |
15,150 | postmanlabs/postman-collection | lib/collection/property-list.js | function (iterator, context) {
return _.map(this.members, _.isFunction(iterator) ? iterator.bind(context || this) : iterator);
} | javascript | function (iterator, context) {
return _.map(this.members, _.isFunction(iterator) ? iterator.bind(context || this) : iterator);
} | [
"function",
"(",
"iterator",
",",
"context",
")",
"{",
"return",
"_",
".",
"map",
"(",
"this",
".",
"members",
",",
"_",
".",
"isFunction",
"(",
"iterator",
")",
"?",
"iterator",
".",
"bind",
"(",
"context",
"||",
"this",
")",
":",
"iterator",
")",
... | Iterates over the property list.
@param {Function} iterator Function to call on each item.
@param {Object} context Optional context, defaults to the PropertyList itself. | [
"Iterates",
"over",
"the",
"property",
"list",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L426-L428 | |
15,151 | postmanlabs/postman-collection | lib/collection/property-list.js | function (iterator, accumulator, context) {
return _.reduce(this.members, _.isFunction(iterator) ? iterator.bind(context || this) : iterator, accumulator);
} | javascript | function (iterator, accumulator, context) {
return _.reduce(this.members, _.isFunction(iterator) ? iterator.bind(context || this) : iterator, accumulator);
} | [
"function",
"(",
"iterator",
",",
"accumulator",
",",
"context",
")",
"{",
"return",
"_",
".",
"reduce",
"(",
"this",
".",
"members",
",",
"_",
".",
"isFunction",
"(",
"iterator",
")",
"?",
"iterator",
".",
"bind",
"(",
"context",
"||",
"this",
")",
... | Iterates over the property list and accumulates the result.
@param {Function} iterator Function to call on each item.
@param {*} accumulator Accumulator initial value
@param {Object} context Optional context, defaults to the PropertyList itself. | [
"Iterates",
"over",
"the",
"property",
"list",
"and",
"accumulates",
"the",
"result",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L437-L439 | |
15,152 | postmanlabs/postman-collection | lib/collection/property-list.js | function (item) {
return this.members.indexOf(_.isString(item) ? (item = this.one(item)) : item);
} | javascript | function (item) {
return this.members.indexOf(_.isString(item) ? (item = this.one(item)) : item);
} | [
"function",
"(",
"item",
")",
"{",
"return",
"this",
".",
"members",
".",
"indexOf",
"(",
"_",
".",
"isString",
"(",
"item",
")",
"?",
"(",
"item",
"=",
"this",
".",
"one",
"(",
"item",
")",
")",
":",
"item",
")",
";",
"}"
] | Find the index of an item in this list
@param {String|Object} item
@returns {Number} | [
"Find",
"the",
"index",
"of",
"an",
"item",
"in",
"this",
"list"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L466-L468 | |
15,153 | postmanlabs/postman-collection | lib/collection/property-list.js | function (item, value) {
var match,
val,
i;
match = _.isString(item) ?
this.reference[this._postman_listIndexCaseInsensitive ? item.toLowerCase() : item] :
this.filter(function (member) {
return member === item;
});
//... | javascript | function (item, value) {
var match,
val,
i;
match = _.isString(item) ?
this.reference[this._postman_listIndexCaseInsensitive ? item.toLowerCase() : item] :
this.filter(function (member) {
return member === item;
});
//... | [
"function",
"(",
"item",
",",
"value",
")",
"{",
"var",
"match",
",",
"val",
",",
"i",
";",
"match",
"=",
"_",
".",
"isString",
"(",
"item",
")",
"?",
"this",
".",
"reference",
"[",
"this",
".",
"_postman_listIndexCaseInsensitive",
"?",
"item",
".",
... | Check whether an item exists in this list
@param {String|PropertyList.Type} item
@param {*=} value
@returns {Boolean} | [
"Check",
"whether",
"an",
"item",
"exists",
"in",
"this",
"list"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L477-L515 | |
15,154 | postmanlabs/postman-collection | lib/collection/property-list.js | function (iterator, context) {
// validate parameters
if (!_.isFunction(iterator)) { return; }
!context && (context = this);
var parent = this.__parent,
prev;
// iterate till there is no parent
while (parent) {
// call iterator with the parent an... | javascript | function (iterator, context) {
// validate parameters
if (!_.isFunction(iterator)) { return; }
!context && (context = this);
var parent = this.__parent,
prev;
// iterate till there is no parent
while (parent) {
// call iterator with the parent an... | [
"function",
"(",
"iterator",
",",
"context",
")",
"{",
"// validate parameters",
"if",
"(",
"!",
"_",
".",
"isFunction",
"(",
"iterator",
")",
")",
"{",
"return",
";",
"}",
"!",
"context",
"&&",
"(",
"context",
"=",
"this",
")",
";",
"var",
"parent",
... | Iterates over all parents of the property list
@param {Function} iterator
@param {Object=} [context] | [
"Iterates",
"over",
"all",
"parents",
"of",
"the",
"property",
"list"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L523-L540 | |
15,155 | postmanlabs/postman-collection | lib/collection/property-list.js | function (excludeDisabled, caseSensitive, multiValue, sanitizeKeys) {
var obj = {}, // create transformation data accumulator
// gather all the switches of the list
key = this._postman_listIndexKey,
sanitiseKeys = this._postman_sanitizeKeys || sanitizeKeys,
sensi... | javascript | function (excludeDisabled, caseSensitive, multiValue, sanitizeKeys) {
var obj = {}, // create transformation data accumulator
// gather all the switches of the list
key = this._postman_listIndexKey,
sanitiseKeys = this._postman_sanitizeKeys || sanitizeKeys,
sensi... | [
"function",
"(",
"excludeDisabled",
",",
"caseSensitive",
",",
"multiValue",
",",
"sanitizeKeys",
")",
"{",
"var",
"obj",
"=",
"{",
"}",
",",
"// create transformation data accumulator",
"// gather all the switches of the list",
"key",
"=",
"this",
".",
"_postman_listIn... | Converts a list of Properties into an object where key is `_postman_propertyIndexKey` and value is determined
by the `valueOf` function
@param {?Boolean} [excludeDisabled=false] - When set to true, disabled properties are excluded from the resultant
object.
@param {?Boolean} [caseSensitive] - When set to true, propert... | [
"Converts",
"a",
"list",
"of",
"Properties",
"into",
"an",
"object",
"where",
"key",
"is",
"_postman_propertyIndexKey",
"and",
"value",
"is",
"determined",
"by",
"the",
"valueOf",
"function"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L557-L593 | |
15,156 | postmanlabs/postman-collection | lib/collection/property-list.js | function () {
if (this.Type.unparse) {
return this.Type.unparse(this.members);
}
return this.constructor ? this.constructor.prototype.toString.call(this) : '';
} | javascript | function () {
if (this.Type.unparse) {
return this.Type.unparse(this.members);
}
return this.constructor ? this.constructor.prototype.toString.call(this) : '';
} | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"Type",
".",
"unparse",
")",
"{",
"return",
"this",
".",
"Type",
".",
"unparse",
"(",
"this",
".",
"members",
")",
";",
"}",
"return",
"this",
".",
"constructor",
"?",
"this",
".",
"constructor",
"... | Adds ability to convert a list to a string provided it's underlying format has unparse function defined.
@return {String} | [
"Adds",
"ability",
"to",
"convert",
"a",
"list",
"to",
"a",
"string",
"provided",
"it",
"s",
"underlying",
"format",
"has",
"unparse",
"function",
"defined",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L600-L606 | |
15,157 | postmanlabs/postman-collection | lib/collection/property-list.js | function (obj) {
return Boolean(obj) && ((obj instanceof PropertyList) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', PropertyList._postman_propertyName));
} | javascript | function (obj) {
return Boolean(obj) && ((obj instanceof PropertyList) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', PropertyList._postman_propertyName));
} | [
"function",
"(",
"obj",
")",
"{",
"return",
"Boolean",
"(",
"obj",
")",
"&&",
"(",
"(",
"obj",
"instanceof",
"PropertyList",
")",
"||",
"_",
".",
"inSuperChain",
"(",
"obj",
".",
"constructor",
",",
"'_postman_propertyName'",
",",
"PropertyList",
".",
"_po... | Checks whether an object is a PropertyList
@param {*} obj
@returns {Boolean} | [
"Checks",
"whether",
"an",
"object",
"is",
"a",
"PropertyList"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/property-list.js#L676-L679 | |
15,158 | postmanlabs/postman-collection | lib/collection/request-auth.js | function (options, type) {
// update must have options
if (!_.isObject(options)) { return; }
// validate type parameter and/or choose default from existing type.
if (!RequestAuth.isValidType(type)) { type = this.type; }
var parameters = this[type];
// in case the type h... | javascript | function (options, type) {
// update must have options
if (!_.isObject(options)) { return; }
// validate type parameter and/or choose default from existing type.
if (!RequestAuth.isValidType(type)) { type = this.type; }
var parameters = this[type];
// in case the type h... | [
"function",
"(",
"options",
",",
"type",
")",
"{",
"// update must have options",
"if",
"(",
"!",
"_",
".",
"isObject",
"(",
"options",
")",
")",
"{",
"return",
";",
"}",
"// validate type parameter and/or choose default from existing type.",
"if",
"(",
"!",
"Requ... | Update the parameters of a specific authentication type. If none is provided then it uses the one marked as to be
used.
@param {VariableList|Array|Object} options
@param {String=} [type=this.type] | [
"Update",
"the",
"parameters",
"of",
"a",
"specific",
"authentication",
"type",
".",
"If",
"none",
"is",
"provided",
"then",
"it",
"uses",
"the",
"one",
"marked",
"as",
"to",
"be",
"used",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/request-auth.js#L74-L96 | |
15,159 | postmanlabs/postman-collection | lib/collection/request-auth.js | function (type) {
if (!(RequestAuth.isValidType(type) && VariableList.isVariableList(this[type]))) {
return;
}
// clear the variable list
this[type].clear();
// if it is not a currently selected auth type, do not delete the variable list, but simply delete it
... | javascript | function (type) {
if (!(RequestAuth.isValidType(type) && VariableList.isVariableList(this[type]))) {
return;
}
// clear the variable list
this[type].clear();
// if it is not a currently selected auth type, do not delete the variable list, but simply delete it
... | [
"function",
"(",
"type",
")",
"{",
"if",
"(",
"!",
"(",
"RequestAuth",
".",
"isValidType",
"(",
"type",
")",
"&&",
"VariableList",
".",
"isVariableList",
"(",
"this",
"[",
"type",
"]",
")",
")",
")",
"{",
"return",
";",
"}",
"// clear the variable list",... | Clears the definition of an auth type.
@param {String} type | [
"Clears",
"the",
"definition",
"of",
"an",
"auth",
"type",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/request-auth.js#L149-L161 | |
15,160 | postmanlabs/postman-collection | lib/collection/url.js | function (url) {
!url && (url = E);
var parsedUrl = _.isString(url) ? Url.parse(url) : url,
auth = parsedUrl.auth,
protocol = parsedUrl.protocol,
port = parsedUrl.port,
path = parsedUrl.path,
hash = parsedUrl.hash,
host = parsedUrl.... | javascript | function (url) {
!url && (url = E);
var parsedUrl = _.isString(url) ? Url.parse(url) : url,
auth = parsedUrl.auth,
protocol = parsedUrl.protocol,
port = parsedUrl.port,
path = parsedUrl.path,
hash = parsedUrl.hash,
host = parsedUrl.... | [
"function",
"(",
"url",
")",
"{",
"!",
"url",
"&&",
"(",
"url",
"=",
"E",
")",
";",
"var",
"parsedUrl",
"=",
"_",
".",
"isString",
"(",
"url",
")",
"?",
"Url",
".",
"parse",
"(",
"url",
")",
":",
"url",
",",
"auth",
"=",
"parsedUrl",
".",
"au... | Set a URL.
@draft
@param {String|Object} url | [
"Set",
"a",
"URL",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/url.js#L68-L156 | |
15,161 | postmanlabs/postman-collection | lib/collection/url.js | function (params) {
params = _.isString(params) ? QueryParam.parse(params) : params;
this.query.populate(params);
} | javascript | function (params) {
params = _.isString(params) ? QueryParam.parse(params) : params;
this.query.populate(params);
} | [
"function",
"(",
"params",
")",
"{",
"params",
"=",
"_",
".",
"isString",
"(",
"params",
")",
"?",
"QueryParam",
".",
"parse",
"(",
"params",
")",
":",
"params",
";",
"this",
".",
"query",
".",
"populate",
"(",
"params",
")",
";",
"}"
] | Add query parameters to the URL.
@param {Object|String} params Key value pairs to add to the URL. | [
"Add",
"query",
"parameters",
"to",
"the",
"URL",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/url.js#L163-L166 | |
15,162 | postmanlabs/postman-collection | lib/collection/url.js | function (params) {
params = _.isArray(params) ? _.map(params, function (param) {
return param.key ? param.key : param;
}) : [params];
this.query.remove(function (param) {
return _.includes(params, param.key);
});
} | javascript | function (params) {
params = _.isArray(params) ? _.map(params, function (param) {
return param.key ? param.key : param;
}) : [params];
this.query.remove(function (param) {
return _.includes(params, param.key);
});
} | [
"function",
"(",
"params",
")",
"{",
"params",
"=",
"_",
".",
"isArray",
"(",
"params",
")",
"?",
"_",
".",
"map",
"(",
"params",
",",
"function",
"(",
"param",
")",
"{",
"return",
"param",
".",
"key",
"?",
"param",
".",
"key",
":",
"param",
";",... | Removes query parameters from the URL.
@param {Array<QueryParam>|Array<String>|String} params Params should be an array of strings, or an array of
actual query parameters, or a string containing the parameter key.
@note Input should *not* be a query string. | [
"Removes",
"query",
"parameters",
"from",
"the",
"URL",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/url.js#L175-L182 | |
15,163 | postmanlabs/postman-collection | lib/collection/url.js | function (encode) {
if (!this.query.count()) {
return E;
}
if (typeof encode === OBJECT) { // @todo discontinue in v4
return QueryParam.unparse(this.query.all(), encode);
}
return QueryParam.unparse(this.query.all(), { encode: encode });
} | javascript | function (encode) {
if (!this.query.count()) {
return E;
}
if (typeof encode === OBJECT) { // @todo discontinue in v4
return QueryParam.unparse(this.query.all(), encode);
}
return QueryParam.unparse(this.query.all(), { encode: encode });
} | [
"function",
"(",
"encode",
")",
"{",
"if",
"(",
"!",
"this",
".",
"query",
".",
"count",
"(",
")",
")",
"{",
"return",
"E",
";",
"}",
"if",
"(",
"typeof",
"encode",
"===",
"OBJECT",
")",
"{",
"// @todo discontinue in v4",
"return",
"QueryParam",
".",
... | Returns the stringified query string for this URL.
@param {?Boolean} [encode=false] - Enables URL encoding when processing the query string
@returns {String}
@deprecated since v3.4.6, drop support for `encode`
@note Deprecated variant of this function is as follows:
- param {?Object} [options={}]
- param {?Boolean} ... | [
"Returns",
"the",
"stringified",
"query",
"string",
"for",
"this",
"URL",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/url.js#L290-L300 | |
15,164 | postmanlabs/postman-collection | lib/collection/url.js | function (encodeQuery) {
var path = this.getPath();
// check count first so that, we can ensure that ba `?` is always appended, even if a blank query string exists
if (this.query.count()) {
path += (QUERY_SEPARATOR + this.getQueryString(encodeQuery));
}
return path;... | javascript | function (encodeQuery) {
var path = this.getPath();
// check count first so that, we can ensure that ba `?` is always appended, even if a blank query string exists
if (this.query.count()) {
path += (QUERY_SEPARATOR + this.getQueryString(encodeQuery));
}
return path;... | [
"function",
"(",
"encodeQuery",
")",
"{",
"var",
"path",
"=",
"this",
".",
"getPath",
"(",
")",
";",
"// check count first so that, we can ensure that ba `?` is always appended, even if a blank query string exists",
"if",
"(",
"this",
".",
"query",
".",
"count",
"(",
")... | Returns the complete path, including the query string.
@param {?Boolean} [encodeQuery=false] - when set to `true` the query string part will be URL encoded
@returns {*|string}
@example /something/postman?hi=notbye
@deprecated since v3.4.6, drop support for `encodeQuery` | [
"Returns",
"the",
"complete",
"path",
"including",
"the",
"query",
"string",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/url.js#L312-L321 | |
15,165 | postmanlabs/postman-collection | lib/collection/url.js | function () {
if (!this.host) {
return E;
}
return _.isArray(this.host) ? this.host.join(DOMAIN_SEPARATOR) : this.host.toString();
} | javascript | function () {
if (!this.host) {
return E;
}
return _.isArray(this.host) ? this.host.join(DOMAIN_SEPARATOR) : this.host.toString();
} | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"host",
")",
"{",
"return",
"E",
";",
"}",
"return",
"_",
".",
"isArray",
"(",
"this",
".",
"host",
")",
"?",
"this",
".",
"host",
".",
"join",
"(",
"DOMAIN_SEPARATOR",
")",
":",
"this",
"... | Returns the host part of the URL
@returns {string} | [
"Returns",
"the",
"host",
"part",
"of",
"the",
"URL"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/url.js#L328-L334 | |
15,166 | postmanlabs/postman-collection | lib/collection/url.js | function (obj) {
return Boolean(obj) && ((obj instanceof Url) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', Url._postman_propertyName));
} | javascript | function (obj) {
return Boolean(obj) && ((obj instanceof Url) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', Url._postman_propertyName));
} | [
"function",
"(",
"obj",
")",
"{",
"return",
"Boolean",
"(",
"obj",
")",
"&&",
"(",
"(",
"obj",
"instanceof",
"Url",
")",
"||",
"_",
".",
"inSuperChain",
"(",
"obj",
".",
"constructor",
",",
"'_postman_propertyName'",
",",
"Url",
".",
"_postman_propertyName... | Checks whether an object is a Url
@param {*} obj
@returns {Boolean} | [
"Checks",
"whether",
"an",
"object",
"is",
"a",
"Url"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/url.js#L474-L477 | |
15,167 | postmanlabs/postman-collection | lib/collection/query-param.js | function (param) {
_.assign(this, /** @lends QueryParam.prototype */ _.isString(param) ? QueryParam.parseSingle(param) : {
key: _.get(param, 'key'), // we do not replace falsey with blank string since null has a meaning
value: _.get(param, 'value')
});
_.has(param, 'syste... | javascript | function (param) {
_.assign(this, /** @lends QueryParam.prototype */ _.isString(param) ? QueryParam.parseSingle(param) : {
key: _.get(param, 'key'), // we do not replace falsey with blank string since null has a meaning
value: _.get(param, 'value')
});
_.has(param, 'syste... | [
"function",
"(",
"param",
")",
"{",
"_",
".",
"assign",
"(",
"this",
",",
"/** @lends QueryParam.prototype */",
"_",
".",
"isString",
"(",
"param",
")",
"?",
"QueryParam",
".",
"parseSingle",
"(",
"param",
")",
":",
"{",
"key",
":",
"_",
".",
"get",
"(... | Updates the key and value of the query parameter
@param {String|Object} param
@param {String} param.key
@param {String=} [param.value] | [
"Updates",
"the",
"key",
"and",
"value",
"of",
"the",
"query",
"parameter"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/query-param.js#L59-L65 | |
15,168 | postmanlabs/postman-collection | lib/collection/query-param.js | function (query) {
return _.isString(query) ? query.split(AMPERSAND).map(QueryParam.parseSingle) : [];
} | javascript | function (query) {
return _.isString(query) ? query.split(AMPERSAND).map(QueryParam.parseSingle) : [];
} | [
"function",
"(",
"query",
")",
"{",
"return",
"_",
".",
"isString",
"(",
"query",
")",
"?",
"query",
".",
"split",
"(",
"AMPERSAND",
")",
".",
"map",
"(",
"QueryParam",
".",
"parseSingle",
")",
":",
"[",
"]",
";",
"}"
] | Parse a query string into an array of objects, where each object contains a key and a value.
@param {String} query
@returns {Array} | [
"Parse",
"a",
"query",
"string",
"into",
"an",
"array",
"of",
"objects",
"where",
"each",
"object",
"contains",
"a",
"key",
"and",
"a",
"value",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/query-param.js#L102-L104 | |
15,169 | postmanlabs/postman-collection | lib/collection/query-param.js | function (param, idx, all) {
// helps handle weird edge cases such as "/get?a=b&&"
if (param === EMPTY && // if param is empty
_.isNumber(idx) && // this and the next condition ensures that this is part of a map call
_.isArray(all) &&
idx !== (all && (all.length - 1))... | javascript | function (param, idx, all) {
// helps handle weird edge cases such as "/get?a=b&&"
if (param === EMPTY && // if param is empty
_.isNumber(idx) && // this and the next condition ensures that this is part of a map call
_.isArray(all) &&
idx !== (all && (all.length - 1))... | [
"function",
"(",
"param",
",",
"idx",
",",
"all",
")",
"{",
"// helps handle weird edge cases such as \"/get?a=b&&\"",
"if",
"(",
"param",
"===",
"EMPTY",
"&&",
"// if param is empty",
"_",
".",
"isNumber",
"(",
"idx",
")",
"&&",
"// this and the next condition ensure... | Parses a single query parameter.
@param {String} param
@param {Number} idx
@param {String[]} all - array of all params, in case this is being called while parsing multiple params.
@returns {{key: string|null, value: string|null}} | [
"Parses",
"a",
"single",
"query",
"parameter",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/query-param.js#L114-L138 | |
15,170 | postmanlabs/postman-collection | lib/collection/query-param.js | function (obj, encode) {
if (!obj) { return EMPTY; }
var key = obj.key,
value = obj.value;
if (value === undefined) {
return EMPTY;
}
if (key === null) {
key = EMPTY;
}
if (value === null) {
return encode ? urlEn... | javascript | function (obj, encode) {
if (!obj) { return EMPTY; }
var key = obj.key,
value = obj.value;
if (value === undefined) {
return EMPTY;
}
if (key === null) {
key = EMPTY;
}
if (value === null) {
return encode ? urlEn... | [
"function",
"(",
"obj",
",",
"encode",
")",
"{",
"if",
"(",
"!",
"obj",
")",
"{",
"return",
"EMPTY",
";",
"}",
"var",
"key",
"=",
"obj",
".",
"key",
",",
"value",
"=",
"obj",
".",
"value",
";",
"if",
"(",
"value",
"===",
"undefined",
")",
"{",
... | Takes a query param and converts to string
@param {Object} obj
@param {Boolean} encode
@returns {String}
@deprecated since v3.4.6, drop support for `encode` | [
"Takes",
"a",
"query",
"param",
"and",
"converts",
"to",
"string"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/query-param.js#L194-L218 | |
15,171 | postmanlabs/postman-collection | lib/content-info/index.js | function (response) {
var contentType = response.headers.get(HEADERS.CONTENT_TYPE),
contentDisposition = response.headers.get(HEADERS.CONTENT_DISPOSITION),
mimeInfo = getMimeInfo(contentType, response.stream || response.body),
fileName = getFileNameFromDispositionHeader(conte... | javascript | function (response) {
var contentType = response.headers.get(HEADERS.CONTENT_TYPE),
contentDisposition = response.headers.get(HEADERS.CONTENT_DISPOSITION),
mimeInfo = getMimeInfo(contentType, response.stream || response.body),
fileName = getFileNameFromDispositionHeader(conte... | [
"function",
"(",
"response",
")",
"{",
"var",
"contentType",
"=",
"response",
".",
"headers",
".",
"get",
"(",
"HEADERS",
".",
"CONTENT_TYPE",
")",
",",
"contentDisposition",
"=",
"response",
".",
"headers",
".",
"get",
"(",
"HEADERS",
".",
"CONTENT_DISPOSIT... | Extracts content related information from response.
Includes response mime information, character set and file name.
@private
@param {Response} response - response instance
@returns {Response~ResponseContentInfo} - Return contentInfo of the response | [
"Extracts",
"content",
"related",
"information",
"from",
"response",
".",
"Includes",
"response",
"mime",
"information",
"character",
"set",
"and",
"file",
"name",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/content-info/index.js#L335-L369 | |
15,172 | postmanlabs/postman-collection | lib/collection/collection.js | function () {
var json = ItemGroup.prototype.toJSON.apply(this);
// move ids and stuff from root level to `info` object
json.info = {
_postman_id: this.id,
name: this.name,
version: this.version,
schema: SCHEMA_URL
};
delete json.... | javascript | function () {
var json = ItemGroup.prototype.toJSON.apply(this);
// move ids and stuff from root level to `info` object
json.info = {
_postman_id: this.id,
name: this.name,
version: this.version,
schema: SCHEMA_URL
};
delete json.... | [
"function",
"(",
")",
"{",
"var",
"json",
"=",
"ItemGroup",
".",
"prototype",
".",
"toJSON",
".",
"apply",
"(",
"this",
")",
";",
"// move ids and stuff from root level to `info` object",
"json",
".",
"info",
"=",
"{",
"_postman_id",
":",
"this",
".",
"id",
... | Convert the collection to JSON compatible plain object
@returns {Object} | [
"Convert",
"the",
"collection",
"to",
"JSON",
"compatible",
"plain",
"object"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/collection.js#L193-L214 | |
15,173 | postmanlabs/postman-collection | lib/util.js | function (child, base) {
Object.defineProperty(child, 'super_', {
value: _.isFunction(base) ? base : _.noop,
configurable: false,
enumerable: false,
writable: false
});
child.prototype = Object.create((_.isFunction(base) ? base.prototype : base), ... | javascript | function (child, base) {
Object.defineProperty(child, 'super_', {
value: _.isFunction(base) ? base : _.noop,
configurable: false,
enumerable: false,
writable: false
});
child.prototype = Object.create((_.isFunction(base) ? base.prototype : base), ... | [
"function",
"(",
"child",
",",
"base",
")",
"{",
"Object",
".",
"defineProperty",
"(",
"child",
",",
"'super_'",
",",
"{",
"value",
":",
"_",
".",
"isFunction",
"(",
"base",
")",
"?",
"base",
":",
"_",
".",
"noop",
",",
"configurable",
":",
"false",
... | Creates an inheritance relation between the child and the parent, adding a 'super_' attribute to the
child, and setting up the child prototype.
@param {Function} child - The target object to create parent references for,.
@param {Function} base - The parent association to assign to the provided child definition.
@retu... | [
"Creates",
"an",
"inheritance",
"relation",
"between",
"the",
"child",
"and",
"the",
"parent",
"adding",
"a",
"super_",
"attribute",
"to",
"the",
"child",
"and",
"setting",
"up",
"the",
"child",
"prototype",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/util.js#L24-L41 | |
15,174 | postmanlabs/postman-collection | lib/util.js | function (obj, name, Prop, fallback) {
return _.has(obj, name) ? (new Prop(obj[name])) : fallback;
} | javascript | function (obj, name, Prop, fallback) {
return _.has(obj, name) ? (new Prop(obj[name])) : fallback;
} | [
"function",
"(",
"obj",
",",
"name",
",",
"Prop",
",",
"fallback",
")",
"{",
"return",
"_",
".",
"has",
"(",
"obj",
",",
"name",
")",
"?",
"(",
"new",
"Prop",
"(",
"obj",
"[",
"name",
"]",
")",
")",
":",
"fallback",
";",
"}"
] | Creates a property on an object, with the given type.
@param {Object} obj
@param {String} name
@param {Property} Prop
@param {*} [fallback]
@returns {Prop|undefined} | [
"Creates",
"a",
"property",
"on",
"an",
"object",
"with",
"the",
"given",
"type",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/util.js#L110-L112 | |
15,175 | postmanlabs/postman-collection | lib/util.js | function (target, source) {
var key;
for (key in source) {
if (source.hasOwnProperty(key) && !_.isUndefined(source[key])) {
target[key] = source[key];
}
}
return target;
} | javascript | function (target, source) {
var key;
for (key in source) {
if (source.hasOwnProperty(key) && !_.isUndefined(source[key])) {
target[key] = source[key];
}
}
return target;
} | [
"function",
"(",
"target",
",",
"source",
")",
"{",
"var",
"key",
";",
"for",
"(",
"key",
"in",
"source",
")",
"{",
"if",
"(",
"source",
".",
"hasOwnProperty",
"(",
"key",
")",
"&&",
"!",
"_",
".",
"isUndefined",
"(",
"source",
"[",
"key",
"]",
"... | Merges defined keys from the target object onto the source object.
@param {Object} target
@param {Object} source
@returns {Object} | [
"Merges",
"defined",
"keys",
"from",
"the",
"target",
"object",
"onto",
"the",
"source",
"object",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/util.js#L121-L131 | |
15,176 | postmanlabs/postman-collection | lib/util.js | function (obj, prop, def) {
return _.has(obj, prop) ? obj[prop] : def;
} | javascript | function (obj, prop, def) {
return _.has(obj, prop) ? obj[prop] : def;
} | [
"function",
"(",
"obj",
",",
"prop",
",",
"def",
")",
"{",
"return",
"_",
".",
"has",
"(",
"obj",
",",
"prop",
")",
"?",
"obj",
"[",
"prop",
"]",
":",
"def",
";",
"}"
] | Returns the value of a property if defined in object, else the default
@param {Object} obj
@param {String} prop
@param {*=} def
@returns {*} | [
"Returns",
"the",
"value",
"of",
"a",
"property",
"if",
"defined",
"in",
"object",
"else",
"the",
"default"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/util.js#L142-L144 | |
15,177 | postmanlabs/postman-collection | lib/util.js | function (obj) {
return _.cloneDeepWith(obj, function (value) {
// falls back to default deepclone if object does not have explicit toJSON().
if (value && _.isFunction(value.toJSON)) {
return value.toJSON();
}
});
} | javascript | function (obj) {
return _.cloneDeepWith(obj, function (value) {
// falls back to default deepclone if object does not have explicit toJSON().
if (value && _.isFunction(value.toJSON)) {
return value.toJSON();
}
});
} | [
"function",
"(",
"obj",
")",
"{",
"return",
"_",
".",
"cloneDeepWith",
"(",
"obj",
",",
"function",
"(",
"value",
")",
"{",
"// falls back to default deepclone if object does not have explicit toJSON().",
"if",
"(",
"value",
"&&",
"_",
".",
"isFunction",
"(",
"val... | Creates a clone of an object, but uses the toJSON method if available.
@param {Object} obj
@returns {*} | [
"Creates",
"a",
"clone",
"of",
"an",
"object",
"but",
"uses",
"the",
"toJSON",
"method",
"if",
"available",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/util.js#L152-L159 | |
15,178 | postmanlabs/postman-collection | lib/util.js | function (obj, key, value) {
return obj ? ((obj[key] === value) || _.inSuperChain(obj.super_, key, value)) : false;
} | javascript | function (obj, key, value) {
return obj ? ((obj[key] === value) || _.inSuperChain(obj.super_, key, value)) : false;
} | [
"function",
"(",
"obj",
",",
"key",
",",
"value",
")",
"{",
"return",
"obj",
"?",
"(",
"(",
"obj",
"[",
"key",
"]",
"===",
"value",
")",
"||",
"_",
".",
"inSuperChain",
"(",
"obj",
".",
"super_",
",",
"key",
",",
"value",
")",
")",
":",
"false"... | Returns the match of a value of a property by traversing the prototype
@param {Object} obj
@param {String} key
@param {*} value
@returns {Boolean} | [
"Returns",
"the",
"match",
"of",
"a",
"value",
"of",
"a",
"property",
"by",
"traversing",
"the",
"prototype"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/util.js#L170-L172 | |
15,179 | postmanlabs/postman-collection | lib/collection/cookie.js | function (obj) {
return Boolean(obj) && ((obj instanceof Cookie) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', Cookie._postman_propertyName));
} | javascript | function (obj) {
return Boolean(obj) && ((obj instanceof Cookie) ||
_.inSuperChain(obj.constructor, '_postman_propertyName', Cookie._postman_propertyName));
} | [
"function",
"(",
"obj",
")",
"{",
"return",
"Boolean",
"(",
"obj",
")",
"&&",
"(",
"(",
"obj",
"instanceof",
"Cookie",
")",
"||",
"_",
".",
"inSuperChain",
"(",
"obj",
".",
"constructor",
",",
"'_postman_propertyName'",
",",
"Cookie",
".",
"_postman_proper... | Check whether an object is an instance of PostmanCookie.
@param {*} obj
@returns {Boolean} | [
"Check",
"whether",
"an",
"object",
"is",
"an",
"instance",
"of",
"PostmanCookie",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/cookie.js#L242-L245 | |
15,180 | postmanlabs/postman-collection | lib/collection/cookie.js | function (str) {
if (!_.isString(str)) {
return str;
}
var obj = {},
pairs = str.split(PAIR_SPLIT_REGEX),
nameval;
nameval = Cookie.splitParam(pairs.shift()); // The first kvp is the name and value
obj.key = nameval.key;
obj.value = n... | javascript | function (str) {
if (!_.isString(str)) {
return str;
}
var obj = {},
pairs = str.split(PAIR_SPLIT_REGEX),
nameval;
nameval = Cookie.splitParam(pairs.shift()); // The first kvp is the name and value
obj.key = nameval.key;
obj.value = n... | [
"function",
"(",
"str",
")",
"{",
"if",
"(",
"!",
"_",
".",
"isString",
"(",
"str",
")",
")",
"{",
"return",
"str",
";",
"}",
"var",
"obj",
"=",
"{",
"}",
",",
"pairs",
"=",
"str",
".",
"split",
"(",
"PAIR_SPLIT_REGEX",
")",
",",
"nameval",
";"... | Cookie header parser
@param {String} str
@returns {*} A plain cookie options object, use it to create a new Cookie | [
"Cookie",
"header",
"parser"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/cookie.js#L253-L284 | |
15,181 | postmanlabs/postman-collection | lib/collection/cookie.js | function (param) {
var split = param.split('='),
key, value;
key = split[0].trim();
value = (split[1]) ? split[1].trim() : true;
if (_.isString(value) && value[0] === '"') {
value = value.slice(1, -1);
}
return { key: key, value: value };
} | javascript | function (param) {
var split = param.split('='),
key, value;
key = split[0].trim();
value = (split[1]) ? split[1].trim() : true;
if (_.isString(value) && value[0] === '"') {
value = value.slice(1, -1);
}
return { key: key, value: value };
} | [
"function",
"(",
"param",
")",
"{",
"var",
"split",
"=",
"param",
".",
"split",
"(",
"'='",
")",
",",
"key",
",",
"value",
";",
"key",
"=",
"split",
"[",
"0",
"]",
".",
"trim",
"(",
")",
";",
"value",
"=",
"(",
"split",
"[",
"1",
"]",
")",
... | Splits a Cookie parameter into a key and a value
@private
@param {String} param
@returns {{key: *, value: (boolean|*)}} | [
"Splits",
"a",
"Cookie",
"parameter",
"into",
"a",
"key",
"and",
"a",
"value"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/cookie.js#L293-L304 | |
15,182 | postmanlabs/postman-collection | lib/collection/request-body.js | function (options) {
_.isString(options) && (options = { mode: 'raw', raw: options });
if (!options.mode) { return; } // need a valid mode @todo raise error?
var mode = RequestBody.MODES[options.mode.toString().toLowerCase()] || RequestBody.MODES.raw,
urlencoded = options.urlencoded... | javascript | function (options) {
_.isString(options) && (options = { mode: 'raw', raw: options });
if (!options.mode) { return; } // need a valid mode @todo raise error?
var mode = RequestBody.MODES[options.mode.toString().toLowerCase()] || RequestBody.MODES.raw,
urlencoded = options.urlencoded... | [
"function",
"(",
"options",
")",
"{",
"_",
".",
"isString",
"(",
"options",
")",
"&&",
"(",
"options",
"=",
"{",
"mode",
":",
"'raw'",
",",
"raw",
":",
"options",
"}",
")",
";",
"if",
"(",
"!",
"options",
".",
"mode",
")",
"{",
"return",
";",
"... | Set the content of this request data
@param {Object} options | [
"Set",
"the",
"content",
"of",
"this",
"request",
"data"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/request-body.js#L36-L140 | |
15,183 | postmanlabs/postman-collection | lib/collection/request-body.js | function () {
// Formdata. Goodluck.
if (this.mode === RequestBody.MODES.formdata || this.mode === RequestBody.MODES.file) {
// @todo: implement this, check if we need to return undefined or something.
return EMPTY;
}
if (this.mode === RequestBody.MODES.urlencode... | javascript | function () {
// Formdata. Goodluck.
if (this.mode === RequestBody.MODES.formdata || this.mode === RequestBody.MODES.file) {
// @todo: implement this, check if we need to return undefined or something.
return EMPTY;
}
if (this.mode === RequestBody.MODES.urlencode... | [
"function",
"(",
")",
"{",
"// Formdata. Goodluck.",
"if",
"(",
"this",
".",
"mode",
"===",
"RequestBody",
".",
"MODES",
".",
"formdata",
"||",
"this",
".",
"mode",
"===",
"RequestBody",
".",
"MODES",
".",
"file",
")",
"{",
"// @todo: implement this, check if ... | Stringifies and returns the request body.
@note FormData is not supported yet.
@returns {*} | [
"Stringifies",
"and",
"returns",
"the",
"request",
"body",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/request-body.js#L148-L165 | |
15,184 | postmanlabs/postman-collection | lib/collection/request-body.js | function () {
var mode = this.mode,
data = mode && this[mode];
// bail out if there's no data for the selected mode
if (!data) {
return true;
}
// Handle file mode
// @note this is a legacy exception. ideally every individual data mode
//... | javascript | function () {
var mode = this.mode,
data = mode && this[mode];
// bail out if there's no data for the selected mode
if (!data) {
return true;
}
// Handle file mode
// @note this is a legacy exception. ideally every individual data mode
//... | [
"function",
"(",
")",
"{",
"var",
"mode",
"=",
"this",
".",
"mode",
",",
"data",
"=",
"mode",
"&&",
"this",
"[",
"mode",
"]",
";",
"// bail out if there's no data for the selected mode",
"if",
"(",
"!",
"data",
")",
"{",
"return",
"true",
";",
"}",
"// H... | If the request body is set to a mode, but does not contain data, then we should not be sending it.
@returns {Boolean} | [
"If",
"the",
"request",
"body",
"is",
"set",
"to",
"a",
"mode",
"but",
"does",
"not",
"contain",
"data",
"then",
"we",
"should",
"not",
"be",
"sending",
"it",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/request-body.js#L172-L197 | |
15,185 | postmanlabs/postman-collection | lib/superstring/index.js | function (regex, fn) {
var replacements = 0; // maintain a count of tokens replaced
// to ensure we do not perform needless operations in the replacement, we use multiple replacement functions
// after validating the parameters
this.value = (this.value.replace(regex, _.isFunction(fn) ? ... | javascript | function (regex, fn) {
var replacements = 0; // maintain a count of tokens replaced
// to ensure we do not perform needless operations in the replacement, we use multiple replacement functions
// after validating the parameters
this.value = (this.value.replace(regex, _.isFunction(fn) ? ... | [
"function",
"(",
"regex",
",",
"fn",
")",
"{",
"var",
"replacements",
"=",
"0",
";",
"// maintain a count of tokens replaced",
"// to ensure we do not perform needless operations in the replacement, we use multiple replacement functions",
"// after validating the parameters",
"this",
... | Equivalent to string replace but performs additional tracking of the number of tokens replaced
@param {RegExp|String} regex
@param {Function|String} fn
@returns {SuperString} | [
"Equivalent",
"to",
"string",
"replace",
"but",
"performs",
"additional",
"tracking",
"of",
"the",
"number",
"of",
"tokens",
"replaced"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/superstring/index.js#L40-L56 | |
15,186 | postmanlabs/postman-collection | lib/superstring/index.js | function (key) {
var arr = this.variables,
obj,
value,
i,
ii;
for (i = 0, ii = arr.length; i < ii; i++) {
obj = arr[i];
// ensure that the item is an object
if (!(obj && _.isObject(obj))) {
continue;
... | javascript | function (key) {
var arr = this.variables,
obj,
value,
i,
ii;
for (i = 0, ii = arr.length; i < ii; i++) {
obj = arr[i];
// ensure that the item is an object
if (!(obj && _.isObject(obj))) {
continue;
... | [
"function",
"(",
"key",
")",
"{",
"var",
"arr",
"=",
"this",
".",
"variables",
",",
"obj",
",",
"value",
",",
"i",
",",
"ii",
";",
"for",
"(",
"i",
"=",
"0",
",",
"ii",
"=",
"arr",
".",
"length",
";",
"i",
"<",
"ii",
";",
"i",
"++",
")",
... | Find a key from the array of variable objects provided to the substitutor
@param {String} key
@returns {*} | [
"Find",
"a",
"key",
"from",
"the",
"array",
"of",
"variable",
"objects",
"provided",
"to",
"the",
"substitutor"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/superstring/index.js#L93-L120 | |
15,187 | postmanlabs/postman-collection | lib/collection/request.js | function (options) {
// Nothing to do
if (!options) { return; }
// The existing url is updated.
_.has(options, 'url') && this.url.update(options.url);
// The existing list of headers must be cleared before adding the given headers to it.
options.header && this.headers.r... | javascript | function (options) {
// Nothing to do
if (!options) { return; }
// The existing url is updated.
_.has(options, 'url') && this.url.update(options.url);
// The existing list of headers must be cleared before adding the given headers to it.
options.header && this.headers.r... | [
"function",
"(",
"options",
")",
"{",
"// Nothing to do",
"if",
"(",
"!",
"options",
")",
"{",
"return",
";",
"}",
"// The existing url is updated.",
"_",
".",
"has",
"(",
"options",
",",
"'url'",
")",
"&&",
"this",
".",
"url",
".",
"update",
"(",
"optio... | Updates the different properties of the request.
@param {Request~definition} options | [
"Updates",
"the",
"different",
"properties",
"of",
"the",
"request",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/request.js#L138-L176 | |
15,188 | postmanlabs/postman-collection | lib/collection/request.js | function (type, options) {
if (_.isObject(type) && _.isNil(options)) {
type = options.type;
options = _.omit(options, 'type');
}
// null = delete request
if (type === null) {
_.has(this, 'auth') && (delete this.auth);
return;
}
... | javascript | function (type, options) {
if (_.isObject(type) && _.isNil(options)) {
type = options.type;
options = _.omit(options, 'type');
}
// null = delete request
if (type === null) {
_.has(this, 'auth') && (delete this.auth);
return;
}
... | [
"function",
"(",
"type",
",",
"options",
")",
"{",
"if",
"(",
"_",
".",
"isObject",
"(",
"type",
")",
"&&",
"_",
".",
"isNil",
"(",
"options",
")",
")",
"{",
"type",
"=",
"options",
".",
"type",
";",
"options",
"=",
"_",
".",
"omit",
"(",
"opti... | Sets authentication method for the request
@param {?String|RequestAuth~definition} type
@param {VariableList~definition=} [options]
@note This function was previously (in v2 of SDK) used to clone request and populate headers. Now it is used to
only set auth information to request
@note that ItemGroup#authorizeUsing ... | [
"Sets",
"authentication",
"method",
"for",
"the",
"request"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/request.js#L189-L214 | |
15,189 | postmanlabs/postman-collection | lib/collection/request.js | getHeaders | function getHeaders (options) {
!options && (options = {});
// @note: options.multiValue will not be respected since, Header._postman_propertyAllowsMultipleValues
// gets higher precedence in PropertyLists~toObject.
// @todo: sanitizeKeys for headers by default.
return this.head... | javascript | function getHeaders (options) {
!options && (options = {});
// @note: options.multiValue will not be respected since, Header._postman_propertyAllowsMultipleValues
// gets higher precedence in PropertyLists~toObject.
// @todo: sanitizeKeys for headers by default.
return this.head... | [
"function",
"getHeaders",
"(",
"options",
")",
"{",
"!",
"options",
"&&",
"(",
"options",
"=",
"{",
"}",
")",
";",
"// @note: options.multiValue will not be respected since, Header._postman_propertyAllowsMultipleValues",
"// gets higher precedence in PropertyLists~toObject.",
"//... | Returns an object where the key is a header name and value is the header value.
@param {Object=} options
@param {Boolean} options.ignoreCase When set to "true", will ensure that all the header keys are lower case.
@param {Boolean} options.enabled Only get the enabled headers
@param {Boolean} options.multiValue When se... | [
"Returns",
"an",
"object",
"where",
"the",
"key",
"is",
"a",
"header",
"name",
"and",
"value",
"is",
"the",
"header",
"value",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/request.js#L229-L236 |
15,190 | postmanlabs/postman-collection | lib/collection/request.js | function (toRemove, options) {
toRemove = _.isString(toRemove) ? toRemove : toRemove.key;
options = options || {};
if (!toRemove) { // Nothing to remove :(
return;
}
options.ignoreCase && (toRemove = toRemove.toLowerCase());
this.headers.remove(function (h... | javascript | function (toRemove, options) {
toRemove = _.isString(toRemove) ? toRemove : toRemove.key;
options = options || {};
if (!toRemove) { // Nothing to remove :(
return;
}
options.ignoreCase && (toRemove = toRemove.toLowerCase());
this.headers.remove(function (h... | [
"function",
"(",
"toRemove",
",",
"options",
")",
"{",
"toRemove",
"=",
"_",
".",
"isString",
"(",
"toRemove",
")",
"?",
"toRemove",
":",
"toRemove",
".",
"key",
";",
"options",
"=",
"options",
"||",
"{",
"}",
";",
"if",
"(",
"!",
"toRemove",
")",
... | Removes a header from the request.
@param {String|Header} toRemove A header object to remove, or a string containing the header key.
@param {Object} options
@param {Boolean} options.ignoreCase If set to true, ignores case while removing the header. | [
"Removes",
"a",
"header",
"from",
"the",
"request",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/request.js#L265-L280 | |
15,191 | postmanlabs/postman-collection | lib/collection/request.js | function (header) {
if (!(header && header.key)) { return; } // if no valid header is provided, do nothing
var existing = this.headers.find({ key: header.key });
if (!existing) {
return this.headers.add(header);
}
existing.value = header.value;
} | javascript | function (header) {
if (!(header && header.key)) { return; } // if no valid header is provided, do nothing
var existing = this.headers.find({ key: header.key });
if (!existing) {
return this.headers.add(header);
}
existing.value = header.value;
} | [
"function",
"(",
"header",
")",
"{",
"if",
"(",
"!",
"(",
"header",
"&&",
"header",
".",
"key",
")",
")",
"{",
"return",
";",
"}",
"// if no valid header is provided, do nothing",
"var",
"existing",
"=",
"this",
".",
"headers",
".",
"find",
"(",
"{",
"ke... | Updates or inserts the given header.
@param {Object} header | [
"Updates",
"or",
"inserts",
"the",
"given",
"header",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/request.js#L287-L297 | |
15,192 | postmanlabs/postman-collection | lib/collection/request.js | function () {
var contentLength = this.headers.get(CONTENT_LENGTH),
requestTarget = this.url.getPathWithQuery(),
bodyString,
sizeInfo = {
body: 0,
header: 0,
total: 0,
source: SIZE_SOURCE.computed
};
... | javascript | function () {
var contentLength = this.headers.get(CONTENT_LENGTH),
requestTarget = this.url.getPathWithQuery(),
bodyString,
sizeInfo = {
body: 0,
header: 0,
total: 0,
source: SIZE_SOURCE.computed
};
... | [
"function",
"(",
")",
"{",
"var",
"contentLength",
"=",
"this",
".",
"headers",
".",
"get",
"(",
"CONTENT_LENGTH",
")",
",",
"requestTarget",
"=",
"this",
".",
"url",
".",
"getPathWithQuery",
"(",
")",
",",
"bodyString",
",",
"sizeInfo",
"=",
"{",
"body"... | Get the request size by computing the headers and body or using the
actual content length header once the request is sent.
@returns {Object} | [
"Get",
"the",
"request",
"size",
"by",
"computing",
"the",
"headers",
"and",
"body",
"or",
"using",
"the",
"actual",
"content",
"length",
"header",
"once",
"the",
"request",
"is",
"sent",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/request.js#L324-L360 | |
15,193 | postmanlabs/postman-collection | lib/collection/request.js | function () {
var obj = PropertyBase.toJSON(this);
// remove header array if blank
if (_.isArray(obj.header) && !obj.header.length) {
delete obj.header;
}
return obj;
} | javascript | function () {
var obj = PropertyBase.toJSON(this);
// remove header array if blank
if (_.isArray(obj.header) && !obj.header.length) {
delete obj.header;
}
return obj;
} | [
"function",
"(",
")",
"{",
"var",
"obj",
"=",
"PropertyBase",
".",
"toJSON",
"(",
"this",
")",
";",
"// remove header array if blank",
"if",
"(",
"_",
".",
"isArray",
"(",
"obj",
".",
"header",
")",
"&&",
"!",
"obj",
".",
"header",
".",
"length",
")",
... | Converts the Request to a plain JavaScript object, which is also how the request is
represented in a collection file.
@returns {{url: (*|string), method: *, header: (undefined|*), body: *, auth: *, certificate: *}} | [
"Converts",
"the",
"Request",
"to",
"a",
"plain",
"JavaScript",
"object",
"which",
"is",
"also",
"how",
"the",
"request",
"is",
"represented",
"in",
"a",
"collection",
"file",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/request.js#L368-L377 | |
15,194 | postmanlabs/postman-collection | lib/collection/variable-scope.js | function (excludeDisabled, caseSensitive) {
// if the scope has no layers, we simply export the contents of primary store
if (!this._layers) {
return this.values.toObject(excludeDisabled, caseSensitive);
}
var mergedLayers = {};
_.forEachRight(this._layers, function... | javascript | function (excludeDisabled, caseSensitive) {
// if the scope has no layers, we simply export the contents of primary store
if (!this._layers) {
return this.values.toObject(excludeDisabled, caseSensitive);
}
var mergedLayers = {};
_.forEachRight(this._layers, function... | [
"function",
"(",
"excludeDisabled",
",",
"caseSensitive",
")",
"{",
"// if the scope has no layers, we simply export the contents of primary store",
"if",
"(",
"!",
"this",
".",
"_layers",
")",
"{",
"return",
"this",
".",
"values",
".",
"toObject",
"(",
"excludeDisabled... | Converts a list of Variables into an object where key is `_postman_propertyIndexKey` and value is determined
by the `valueOf` function
@param {Boolean} excludeDisabled
@param {Boolean} caseSensitive
@return {Object} | [
"Converts",
"a",
"list",
"of",
"Variables",
"into",
"an",
"object",
"where",
"key",
"is",
"_postman_propertyIndexKey",
"and",
"value",
"is",
"determined",
"by",
"the",
"valueOf",
"function"
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/variable-scope.js#L178-L191 | |
15,195 | postmanlabs/postman-collection | lib/collection/variable-scope.js | function (key) {
var variable = this.values.oneNormalizedVariable(key),
i,
ii;
// if a variable does not exist in local scope, we search all the layers and return the first occurrence.
if (!(variable || !this._layers)) {
for (i = 0, ii = this._layers.length; ... | javascript | function (key) {
var variable = this.values.oneNormalizedVariable(key),
i,
ii;
// if a variable does not exist in local scope, we search all the layers and return the first occurrence.
if (!(variable || !this._layers)) {
for (i = 0, ii = this._layers.length; ... | [
"function",
"(",
"key",
")",
"{",
"var",
"variable",
"=",
"this",
".",
"values",
".",
"oneNormalizedVariable",
"(",
"key",
")",
",",
"i",
",",
"ii",
";",
"// if a variable does not exist in local scope, we search all the layers and return the first occurrence.",
"if",
"... | Fetches a variable from the current scope or from parent scopes if present.
@param {String} key - The name of the variable to get.
@returns {*} The value of the specified variable across scopes. | [
"Fetches",
"a",
"variable",
"from",
"the",
"current",
"scope",
"or",
"from",
"parent",
"scopes",
"if",
"present",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/variable-scope.js#L211-L225 | |
15,196 | postmanlabs/postman-collection | lib/collection/variable-scope.js | function (key, value, type) {
var variable = this.values.oneNormalizedVariable(key),
update = { // create an object that will be used as setter
key: key,
value: value
};
_.isString(type) && (update.type = type);
// If a variable by the n... | javascript | function (key, value, type) {
var variable = this.values.oneNormalizedVariable(key),
update = { // create an object that will be used as setter
key: key,
value: value
};
_.isString(type) && (update.type = type);
// If a variable by the n... | [
"function",
"(",
"key",
",",
"value",
",",
"type",
")",
"{",
"var",
"variable",
"=",
"this",
".",
"values",
".",
"oneNormalizedVariable",
"(",
"key",
")",
",",
"update",
"=",
"{",
"// create an object that will be used as setter",
"key",
":",
"key",
",",
"va... | Creates a new variable, or updates an existing one.
@param {String} key - The name of the variable to set.
@param {*} value - The value of the variable to be set.
@param {Variable.types} [type] - Optionally, the value of the variable can be set to a type | [
"Creates",
"a",
"new",
"variable",
"or",
"updates",
"an",
"existing",
"one",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/variable-scope.js#L234-L255 | |
15,197 | postmanlabs/postman-collection | lib/collection/variable-scope.js | function (key) {
var lastDisabledVariable;
this.values.remove(function (variable) {
// bail out if variable name didn't match
if (variable.key !== key) {
return false;
}
// don't delete disabled variables
if (variable.disabled... | javascript | function (key) {
var lastDisabledVariable;
this.values.remove(function (variable) {
// bail out if variable name didn't match
if (variable.key !== key) {
return false;
}
// don't delete disabled variables
if (variable.disabled... | [
"function",
"(",
"key",
")",
"{",
"var",
"lastDisabledVariable",
";",
"this",
".",
"values",
".",
"remove",
"(",
"function",
"(",
"variable",
")",
"{",
"// bail out if variable name didn't match",
"if",
"(",
"variable",
".",
"key",
"!==",
"key",
")",
"{",
"r... | Removes the variable with the specified name.
@param {String} key | [
"Removes",
"the",
"variable",
"with",
"the",
"specified",
"name",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/variable-scope.js#L262-L288 | |
15,198 | postmanlabs/postman-collection | lib/collection/variable-scope.js | function () {
var obj = PropertyBase.toJSON(this);
// @todo - remove this when pluralisation is complete
if (obj.value) {
obj.values = obj.value;
delete obj.value;
}
// ensure that the concept of layers is not exported as JSON. JSON cannot retain referen... | javascript | function () {
var obj = PropertyBase.toJSON(this);
// @todo - remove this when pluralisation is complete
if (obj.value) {
obj.values = obj.value;
delete obj.value;
}
// ensure that the concept of layers is not exported as JSON. JSON cannot retain referen... | [
"function",
"(",
")",
"{",
"var",
"obj",
"=",
"PropertyBase",
".",
"toJSON",
"(",
"this",
")",
";",
"// @todo - remove this when pluralisation is complete",
"if",
"(",
"obj",
".",
"value",
")",
"{",
"obj",
".",
"values",
"=",
"obj",
".",
"value",
";",
"del... | Convert this variable scope into a JSON serialisable object. Useful to transport or store, environment and
globals as a whole.
@returns {Object} | [
"Convert",
"this",
"variable",
"scope",
"into",
"a",
"JSON",
"serialisable",
"object",
".",
"Useful",
"to",
"transport",
"or",
"store",
"environment",
"and",
"globals",
"as",
"a",
"whole",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/variable-scope.js#L391-L413 | |
15,199 | postmanlabs/postman-collection | lib/collection/response.js | function () {
if (!this._details || this._details.code !== this.code) {
this._details = _.clone(httpReasons.lookup(this.code));
this._details.code = this.code;
this._details.standardName = this._details.name;
}
return _.clone(this._details);
} | javascript | function () {
if (!this._details || this._details.code !== this.code) {
this._details = _.clone(httpReasons.lookup(this.code));
this._details.code = this.code;
this._details.standardName = this._details.name;
}
return _.clone(this._details);
} | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"_details",
"||",
"this",
".",
"_details",
".",
"code",
"!==",
"this",
".",
"code",
")",
"{",
"this",
".",
"_details",
"=",
"_",
".",
"clone",
"(",
"httpReasons",
".",
"lookup",
"(",
"this",
... | Creates a JSON representation of the current response details, and returns it.
@returns {Object} A set of response details, including the custom server reason.
@private | [
"Creates",
"a",
"JSON",
"representation",
"of",
"the",
"current",
"response",
"details",
"and",
"returns",
"it",
"."
] | 1cacd38a98c82f86d3f6c61d16a57465bbd78b63 | https://github.com/postmanlabs/postman-collection/blob/1cacd38a98c82f86d3f6c61d16a57465bbd78b63/lib/collection/response.js#L292-L299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.