UNPKG

@hashgraph/solo

Version:

An opinionated CLI tool to deploy and manage private Hedera Networks.

11 lines 503 B
// SPDX-License-Identifier: Apache-2.0 export class Numbers { static isNumeric(string_) { if (typeof string_ !== 'string') { return false; } // we only process strings! return (!Number.isNaN(Number.parseInt(string_)) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)... !Number.isNaN(Number.parseFloat(string_))); // ...and ensure strings of whitespace fail } } //# sourceMappingURL=numbers.js.map