# HG changeset patch # User Yaroslav Zhuravlev # Date 1661262712 -3600 # Node ID ccd42f2b99fbca17effb530b31ddde9b50382094 # Parent 4959250ba4299b3df47ce71b35787c7f855834f2 Deprecated several methods in njs reference. diff -r 4959250ba429 -r ccd42f2b99fb xml/en/docs/njs/reference.xml --- a/xml/en/docs/njs/reference.xml Tue Aug 23 14:51:40 2022 +0100 +++ b/xml/en/docs/njs/reference.xml Tue Aug 23 14:51:52 2022 +0100 @@ -9,7 +9,7 @@
+ rev="87">
@@ -2399,30 +2399,44 @@ String.prototype.fromBytes(start[, end]) -Returns a new Unicode string from a byte string -where each byte is replaced with a corresponding Unicode code point. +the property is deprecated since +0.7.7. +Before 0.7.7, +returned a new Unicode string from a byte string +where each byte was replaced with a corresponding Unicode code point. String.prototype.fromUTF8(start[, end]) -Converts a byte string containing a valid UTF-8 string +the property is deprecated since +0.7.7, +the TextDecoder method +should be used instead. +Before 0.7.7, +converted a byte string containing a valid UTF-8 string into a Unicode string, -otherwise null is returned. +otherwise null was returned. String.prototype.toBytes(start[, end]) -Serializes a Unicode string to a byte string. -Returns null if a character larger than 255 is +the property is deprecated since +0.7.7. +Before 0.7.7, +serialized a Unicode string to a byte string, +returned null if a character larger than 255 was found in the string. String.prototype.toString(encoding) -Encodes a string to +the property is deprecated since +0.7.7. +Before 0.7.7, +encoded a string to hex, base64, or base64url: @@ -2442,8 +2456,13 @@ String.prototype.toUTF8(start[, end]) -Serializes a Unicode string -to a byte string using UTF-8 encoding. +the property is deprecated since +0.7.7, +the TextEncoder method +should be used instead. +Before 0.7.7, +serialized a Unicode string +to a byte string using UTF-8 encoding: >> 'αβγδ'.toUTF8().length 8