CoolFace
Apppublic

opusdev/vector-similarity-api

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes
index.js19 linesDownload Raw Back to is-number
1/*!2 * is-number <https://github.com/jonschlinkert/is-number>3 *4 * Copyright (c) 2014-present, Jon Schlinkert.5 * Released under the MIT License.6 */7 8'use strict';9 10module.exports = function(num) {11  if (typeof num === 'number') {12    return num - num === 0;13  }14  if (typeof num === 'string' && num.trim() !== '') {15    return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);16  }17  return false;18};19