TryGhost/Ghost

View on GitHub
ghost/admin/app/utils/isNumber.js

Summary

Maintainability
A
0 mins
Test Coverage
// isNumber function from lodash

const {toString} = Object.prototype;

export default function (value) {
    return typeof value === 'number'
      || value
      && typeof value === 'object'
      && toString.call(value) === '[object Number]'
      || false;
}