UNPKG

@cloudinary/url-gen

Version:

Cloudinary URL-Gen SDK ========================= [![Build Status](https://api.travis-ci.com/cloudinary/js-url-gen.svg?branch=master)](https://app.travis-ci.com/github/cloudinary/js-url-gen) ## About The Cloudinary URL-Gen SDK allows you to quickly and eas

15 lines (14 loc) 441 B
/** * Return true is value is a number or a string representation of a number. * @function Util.isNumberLike * @param {*} value * @returns {boolean} true if value is a number * @example * Util.isNumber(0) // true * Util.isNumber("1.3") // true * Util.isNumber("") // false * Util.isNumber(undefined) // false */ export const isNumberLike = function (value) { return (value != null) && !isNaN(parseFloat(value)); };