UNPKG

tastypie

Version:

Tastypie is a webservice API framework for Node.js based on Django's Tastypie Framework. It provides a convenient, yet powerful and highly customizable, abstraction for creating REST-style interfaces

16 lines (12 loc) 439 B
define(['./isNumber', '../number/isNaN'], function (isNumber, $isNaN) { /** * Check if value is NaN for realz */ function isNaN(val){ // based on the fact that NaN !== NaN // need to check if it's a number to avoid conflicts with host objects // also need to coerce ToNumber to avoid edge case `new Number(NaN)` return !isNumber(val) || $isNaN(Number(val)); } return isNaN; });