protoblast
Advanced tools
Comparing version 0.8.11 to 0.8.12
@@ -0,1 +1,6 @@ | ||
## 0.8.12 (2023-10-04) | ||
* Fix server-side `String#encodeHTML()` stripping out newline & tab characters | ||
* Add `Deck#size` property getter | ||
## 0.8.11 (2023-07-28) | ||
@@ -2,0 +7,0 @@ |
@@ -0,1 +1,3 @@ | ||
const SIZE = Symbol('size'); | ||
/** | ||
@@ -12,2 +14,3 @@ * The Deck class: a sorted dictionary | ||
this._iterSubject = []; | ||
this[SIZE] = null; | ||
}); | ||
@@ -27,2 +30,33 @@ | ||
/** | ||
* Get the size of this deck | ||
* | ||
* @author Jelle De Loecker <jelle@elevenways.be> | ||
* @since 0.8.12 | ||
* @version 0.8.12 | ||
* | ||
* @type {Number} | ||
*/ | ||
Deck.setProperty(function size() { | ||
let result = this[SIZE]; | ||
if (result == null) { | ||
let entry; | ||
result = 0; | ||
for (entry of this.array) { | ||
if (!entry) { | ||
continue; | ||
} | ||
result++; | ||
} | ||
this[SIZE] = result; | ||
} | ||
return result; | ||
}); | ||
/** | ||
* The values are not sorted at init | ||
@@ -84,3 +118,4 @@ * | ||
var result = new Deck(), | ||
let result = new Deck(), | ||
entry, | ||
key; | ||
@@ -176,3 +211,3 @@ | ||
* @since 0.1.2 | ||
* @version 0.1.4 | ||
* @version 0.8.12 | ||
* | ||
@@ -209,2 +244,4 @@ * @param {String} key | ||
this.dict[key] = item; | ||
this[SIZE] = null; | ||
} else { | ||
@@ -291,3 +328,3 @@ // Overwrite the settings if it does exist | ||
* @since 0.6.4 | ||
* @version 0.6.4 | ||
* @version 0.8.12 | ||
* | ||
@@ -317,2 +354,4 @@ * @param {String} key | ||
this[SIZE] = null; | ||
return true; | ||
@@ -326,3 +365,3 @@ }); | ||
* @since 0.7.27 | ||
* @version 0.7.27 | ||
* @version 0.8.12 | ||
*/ | ||
@@ -337,2 +376,3 @@ Deck.setMethod(function clear() { | ||
this.sortedItems = false; | ||
this[SIZE] = null; | ||
}); | ||
@@ -339,0 +379,0 @@ |
@@ -230,3 +230,3 @@ const REPLACE_FROM_CHARCODE = (match, code) => String.fromCharCode(code), | ||
* @since 0.1.2 | ||
* @version 0.7.26 | ||
* @version 0.8.12 | ||
* | ||
@@ -294,4 +294,11 @@ * @param {Boolean} replace_more Replace more characters (inside attributes) | ||
if (char_code == code_point) { | ||
end_index = i; | ||
// The char code & the code point are the same, | ||
// so it's safe to print | ||
end_index = i + 1; | ||
} else { | ||
// The char code & code point differ, | ||
// so this is some kind of combined character, | ||
// like an emoji | ||
i++; | ||
@@ -298,0 +305,0 @@ changed = true; |
{ | ||
"name": "protoblast", | ||
"description": "Native object expansion library", | ||
"version": "0.8.11", | ||
"version": "0.8.12", | ||
"author": "Jelle De Loecker <jelle@elevenways.be>", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
803780
33193