Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/fetcher/url_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async function handleResponse(response) {
}

/**
* Return a custom message if an error occured
* Return a custom message if an error occurred
* @param {Object} response The response of fetch request
* @returns {String | null}
*/
Expand All @@ -52,7 +52,7 @@ function handleError(response) {
async function get(url, options) {
try {
// fetch does not have "timeout" option, we are using AbortController
// to abort the request if it reach the timeout.
// to abort the request if it reaches the timeout.
const controller = new AbortController();
const timer = setTimeout(() => {
controller.abort();
Expand Down
2 changes: 1 addition & 1 deletion src/parser/extensions_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ function _parseExtension(extNode) {
ext.children = [];
}

// Only return not empty objects to not pollute extentions
// Only return not empty objects to not pollute extensions
return isEmptyExtension(ext) ? null : ext;
}
8 changes: 4 additions & 4 deletions src/parser/parser_verification.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { requiredValues } from '../util/requiredValues';
import { parserUtils } from './parser_utils';

/**
* Verify node required values and also verify recursively all his child nodes.
* Verify node required values and also verify recursively all its child nodes.
* Trigger warnings if a node required value is missing.
* @param {Node} node - The node element.
* @param {Function} emit - Emit function used to trigger Warning event.
Expand Down Expand Up @@ -61,9 +61,9 @@ function verifyRequiredAttributes(node, emit) {
}

/**
* Verify and trigger warnings if node required sub element are not set.
* Verify and trigger warnings if node required sub elements are not set.
* @param {Node} node - The node element
* @param {Boolean} isAdInline - True if node is contained in a inline
* @param {Boolean} isAdInline - True if node is contained in an inline
* @param {Function} emit - Emit function used to trigger Warning event.
* @emits VASTParser#VAST-warning
*/
Expand Down Expand Up @@ -134,7 +134,7 @@ function hasSubElements(node) {
* @param {Array} missingElement.subElements - The array of missing sub elements
* @param {Array} missingElement.oneOfResources - The array of resources in which at least one must be provided by the element
* @param {Function} emit - Emit function used to trigger Warning event.
* @emits VastParser#VAST-warning
* @emits VASTParser#VAST-warning
*/
function emitMissingValueWarning(
{ name, parentName, attributes, subElements, oneOfResources },
Expand Down
2 changes: 1 addition & 1 deletion src/util/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const DEFAULT_STORAGE = {
};

/**
* This class provides an wrapper interface to the a key-value storage.
* This class provides a wrapper interface to a key-value storage.
* It uses localStorage, sessionStorage or a custom storage if none of the two is available.
* @export
* @class Storage
Expand Down
6 changes: 3 additions & 3 deletions src/util/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function extractURLsFromTemplates(URLTemplates) {
}

/**
* Filter URLTemplates elements .
* Filter URLTemplates elements.
* To be valid, urls should:
* - have the same protocol as the client
* or
Expand All @@ -135,7 +135,7 @@ function extractURLsFromTemplates(URLTemplates) {
* - validUrls : An array of valid URLs
* - invalidUrls: An array of invalid URLs
*
* @param {Array} URLTemplates - A Array of string/object containing urls templates.
* @param {Array} URLTemplates - An Array of string/object containing urls templates.
* @returns {Object}
*
*/
Expand All @@ -160,7 +160,7 @@ function isValidUrl(url) {
* Returns a boolean after checking if the object exists in the array.
* true - if the object exists, false otherwise
*
* @param {Object} obj - The object who existence is to be checked.
* @param {Object} obj - The object whose existence is to be checked.
* @param {Array} list - List of objects.
*/
function containsTemplateObject(obj, list) {
Expand Down
4 changes: 2 additions & 2 deletions src/vast_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class VASTClient {
/**
* Gets a parsed VAST document for the given url, applying the skipping rules defined.
* Returns a Promise which resolves with a fully parsed VASTResponse or rejects with an Error.
* @param {String} url - The url to use to fecth the VAST document.
* @param {String} url - The url to use to fetch the VAST document.
* @param {Object} options - An optional Object of parameters to be applied in the process.
* @return {Promise}
*/
Expand All @@ -145,7 +145,7 @@ export class VASTClient {

// Check totalCallsTimeout (first call + 1 hour), if older than now,
// reset totalCalls number, by this way the client will be eligible again
// for freelunch capping
// for FreeLunch capping
if (this.totalCallsTimeout < now) {
this.totalCalls = 1;
this.totalCallsTimeout = now + 60 * 60 * 1000;
Expand Down