summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Stibane <marc@taler.net>2022-10-19 12:02:33 +0200
committerMarc Stibane <marc@taler.net>2022-10-19 12:02:33 +0200
commit4e58261b540bd7b2045e3947ab255ccec5568247 (patch)
treef3a36338a42196ecbe7513e9b74c60b2df3bde0d
parenta9fd1879561822c032fcc486a71899e549e83bfc (diff)
downloadiono-master.tar.gz
iono-master.tar.bz2
iono-master.zip
replace Buffer() with Buffer.from()HEADmaster
see <https://nodejs.org/en/docs/guides/buffer-constructor-deprecation/>
-rw-r--r--iono/iono.swift2
1 files changed, 1 insertions, 1 deletions
diff --git a/iono/iono.swift b/iono/iono.swift
index 95feb5b..84c1f0e 100644
--- a/iono/iono.swift
+++ b/iono/iono.swift
@@ -170,7 +170,7 @@ public class Iono {
let encoded = message.data(using: .utf8)!.base64EncodedString()
let source = """
if (global.__native_onMessage) {
- const msg = (new Buffer('\(encoded)', 'base64')).toString('ascii');
+ const msg = (new Buffer.from('\(encoded)', 'base64')).toString('ascii');
global.__native_onMessage(msg);
} else {
console.log("WARN: no __native_onMessage defined");