Socket
Socket
Sign inDemoInstall

postman-collection

Package Overview
Dependencies
Maintainers
6
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postman-collection - npm Package Compare versions

Comparing version 3.4.1 to 3.4.2-beta.1

docs/mutation-tracking.md

3

docs/tutorial-jsdoc-config.json
{
"concepts": {
"title": "Postman SDK Concepts"
},
"mutation-tracking": {
"title": "Tracking Variable Mutations with Postman Collection SDK"
}
}

18

lib/collection/event-list.js

@@ -30,9 +30,11 @@ var _ = require('../util').lodash,

* @param {String} name
* @param {?Object} options - Set of options
* @param {?Boolean} options.excludeDisabled - When set to true, disabled events are excluded
* @returns {Array<Event>}
*/
listeners: function (name) {
listeners: function (name, options) {
var all;
// we first procure all matching events from this list
all = this.listenersOwn(name);
all = this.listenersOwn(name, options);

@@ -46,3 +48,3 @@ this.eachParent(function (parent) {

(parent !== this.__parent) && EventList.isEventList(parent.events) &&
(parentEvents = parent.events.listenersOwn(name)) && parentEvents.length &&
(parentEvents = parent.events.listenersOwn(name, options)) && parentEvents.length &&
all.unshift.apply(all, parentEvents); // eslint-disable-line prefer-spread

@@ -59,5 +61,13 @@ }, this);

* @param {string} name
* @param {?Object} options - Set of options
* @param {?Boolean} options.excludeDisabled - When set to true, disabled events are excluded
* @returns {Array<Event>}
*/
listenersOwn: function (name) {
listenersOwn: function (name, options) {
if (options && options.excludeDisabled) {
return this.filter(function (event) {
return (!event.disabled && event.listen === name);
});
}
return this.filter(function (event) {

@@ -64,0 +74,0 @@ return (event.listen === name);

@@ -158,3 +158,4 @@ var _ = require('../util').lodash,

* @param {Boolean} options.enabled Only get the enabled headers
*
* @param {Boolean} options.multiValue When set to "true", duplicate header values will be stored in an array
* @returns {Object}
* @note If multiple headers are present in the same collection with same name, but different case

@@ -166,3 +167,3 @@ * (E.g "x-forward-port" and "X-Forward-Port", and `options.ignoreCase` is set to true, the result will contain

!options && (options = {});
return this.headers.toObject(options.enabled, !options.ignoreCase);
return this.headers.toObject(options.enabled, !options.ignoreCase, options.multiValue);
},

@@ -169,0 +170,0 @@

@@ -96,2 +96,3 @@ var _ = require('../util').lodash,

obj,
value,
i,

@@ -109,3 +110,6 @@ ii;

if (obj.constructor._postman_propertyName === 'VariableList') {
if (obj.has(key)) { return obj.one(key); }
value = obj.one(key);
if (value && !value.disabled) {
return value;
}
}

@@ -112,0 +116,0 @@ // else we return the value from the plain object

@@ -5,3 +5,3 @@ {

"author": "Postman Labs <help@getpostman.com>",
"version": "3.4.1",
"version": "3.4.2-beta.1",
"keywords": [

@@ -8,0 +8,0 @@ "postman"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc