feat: ✨ Created a mini nodeJS server with NewMan for testing without PostMan GUI.
This will mimic a run in a CD/CI environment or docker container.
This commit is contained in:
61
node_modules/postman-collection/lib/collection/header-list.js
generated
vendored
Normal file
61
node_modules/postman-collection/lib/collection/header-list.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
var _ = require('../util').lodash,
|
||||
PropertyList = require('./property-list').PropertyList,
|
||||
Header = require('./header').Header,
|
||||
|
||||
PROP_NAME = '_postman_propertyName',
|
||||
|
||||
HeaderList;
|
||||
|
||||
_.inherit((
|
||||
|
||||
/**
|
||||
* Contains a list of header elements
|
||||
*
|
||||
* @constructor
|
||||
* @param {Object} parent -
|
||||
* @param {Header[]} headers -
|
||||
* @extends {PropertyList}
|
||||
*/
|
||||
HeaderList = function (parent, headers) {
|
||||
// this constructor is intended to inherit and as such the super constructor is required to be executed
|
||||
HeaderList.super_.call(this, Header, parent, headers);
|
||||
}), PropertyList);
|
||||
|
||||
_.assign(HeaderList.prototype, /** @lends HeaderList.prototype */ {
|
||||
/**
|
||||
* Gets size of a list of headers excluding standard header prefix.
|
||||
*
|
||||
* @returns {Number}
|
||||
*/
|
||||
contentSize () {
|
||||
if (!this.count()) { return 0; }
|
||||
|
||||
return Header.unparse(this).length;
|
||||
}
|
||||
});
|
||||
|
||||
_.assign(HeaderList, /** @lends HeaderList */ {
|
||||
/**
|
||||
* Defines the name of this property for internal use.
|
||||
*
|
||||
* @private
|
||||
* @readOnly
|
||||
* @type {String}
|
||||
*/
|
||||
_postman_propertyName: 'HeaderList',
|
||||
|
||||
/**
|
||||
* Checks if the given object is a HeaderList
|
||||
*
|
||||
* @param {*} obj -
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
isHeaderList: function (obj) {
|
||||
return Boolean(obj) && ((obj instanceof HeaderList) ||
|
||||
_.inSuperChain(obj.constructor, PROP_NAME, HeaderList._postman_propertyName));
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
HeaderList
|
||||
};
|
Reference in New Issue
Block a user