protoblast
Advanced tools
Comparing version 0.7.26 to 0.7.27
@@ -0,1 +1,7 @@ | ||
## 0.7.27 (2022-12-23) | ||
* Add `Deck#clear()` method | ||
* Fix returned `Function.parallel()` pledge never resolving in synchronous mode | ||
* Add `Blast.stringNeedsHtmlEscaping(str)` method to the server-side | ||
## 0.7.26 (2022-12-09) | ||
@@ -2,0 +8,0 @@ |
@@ -315,2 +315,19 @@ /** | ||
/** | ||
* Remove all current entries | ||
* | ||
* @author Jelle De Loecker <jelle@elevenways.be> | ||
* @since 0.7.27 | ||
* @version 0.7.27 | ||
*/ | ||
Deck.setMethod(function clear() { | ||
this.dict = {}; | ||
this.array = []; | ||
this._iterSubject = []; | ||
this.insertCount = 0; | ||
this._iterSubjectIsArray = false; | ||
this.sorted = false; | ||
this.sortedItems = false; | ||
}); | ||
/** | ||
* Get the value by id (or insert order) | ||
@@ -317,0 +334,0 @@ * |
@@ -583,3 +583,3 @@ /** | ||
// and when we're not still starting (non-async mode) | ||
if (!stillStarting && running == 0) { | ||
if (running == 0 && (!stillStarting || started == length)) { | ||
stop = true; | ||
@@ -586,0 +586,0 @@ scheduler(scheduleCallback); |
@@ -227,2 +227,58 @@ /** | ||
/** | ||
* See if a string contains characters that need escaping | ||
* | ||
* @author Jelle De Loecker <jelle@elevenways.be> | ||
* @since 0.7.27 | ||
* @version 0.7.27 | ||
* | ||
* @param {String} text | ||
* | ||
* @return {Boolean} | ||
*/ | ||
Blast.stringNeedsHtmlEscaping = function stringNeedsHtmlEscaping(text) { | ||
// Load the entities on-the-fly | ||
if (HTMLEntities == null) { | ||
loadEntities(); | ||
} | ||
const length = text.length; | ||
let replacement_codes, | ||
code_point, | ||
code, | ||
i; | ||
for (i = 0; i < length; i++) { | ||
code = text.charCodeAt(i); | ||
if (code > 31 && code < 256) { | ||
if (code == CHAR_LT || code == CHAR_GT || code == CHAR_AMP) { | ||
return true; | ||
} else if (code == CHAR_BACK || code == CHAR_QUOT) { | ||
return true; | ||
} else { | ||
continue; | ||
} | ||
} | ||
replacement_codes = HTMLEntityCodeMap.get(code); | ||
if (replacement_codes) { | ||
return true; | ||
} | ||
code_point = text.codePointAt(i); | ||
if (code == code_point) { | ||
continue; | ||
} else { | ||
return true; | ||
} | ||
} | ||
return false; | ||
}; | ||
/** | ||
* Browser-side implementation of encoding HTML entities | ||
@@ -229,0 +285,0 @@ * |
{ | ||
"name": "protoblast", | ||
"description": "Native object expansion library", | ||
"version": "0.7.26", | ||
"version": "0.7.27", | ||
"author": "Jelle De Loecker <jelle@elevenways.be>", | ||
@@ -32,3 +32,3 @@ "keywords": [ | ||
"jsuri" : "~1.3.1", | ||
"matcha" : "skerit/matcha", | ||
"@c4312/matcha" : "~1.3.1", | ||
"mocha" : "~8.0.1", | ||
@@ -35,0 +35,0 @@ "nyc" : "^15.1.0", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
792478
32646
19