From 95567848c55ea8f70e2f35fa4b9639aa6d421414 Mon Sep 17 00:00:00 2001 From: Otto Allmendinger Date: Tue, 7 Jan 2020 15:04:44 +0100 Subject: [PATCH] src/coins.js: isValidCoin -> isValidNetwork The function takes `network` as an argument after all. Add deprecation notice for old func. --- src/coins.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/coins.js b/src/coins.js index b7e5ddc2..0d5329ea 100644 --- a/src/coins.js +++ b/src/coins.js @@ -55,7 +55,11 @@ function isZcash (network) { return typeforce.value(networks.zcash.coin)(network.coin) } -isValidCoin = typeforce.oneOf( +/** + * @param network + * @returns {boolean} returns true iff network is any of the network stated in the argument + */ +const isValidNetwork = typeforce.oneOf( isBitcoin, isBitcoinCash, isBitcoinSV, @@ -85,5 +89,10 @@ module.exports = { isDash, isLitecoin, isZcash, - isValidCoin + + isValidNetwork, + /** + * @deprecated: use isValidNetwork + */ + isValidCoin: isValidNetwork }