From 226afdc13a223f4c0ca8cd520b717d13085b1e12 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 19 Feb 2020 16:51:40 +0800 Subject: [PATCH] crypto: use the coffee shorthand for prototype --- src/crypto.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto.coffee b/src/crypto.coffee index 3f18f03..4ba1b7a 100644 --- a/src/crypto.coffee +++ b/src/crypto.coffee @@ -6,7 +6,7 @@ fromUtf8Bytes = (bytes) -> new TextDecoder 'utf-8' .decode bytes -hex = (buf) -> (Array.prototype.map.call new Uint8Array(buf), +hex = (buf) -> (Array::map.call new Uint8Array(buf), (x) => ('00' + x.toString 16).slice(-2)).join '' fromHex = (str) ->