Skip to content

Instantly share code, notes, and snippets.

@kentcdodds
Created January 4, 2014 20:50
Show Gist options
  • Save kentcdodds/8260581 to your computer and use it in GitHub Desktop.
Save kentcdodds/8260581 to your computer and use it in GitHub Desktop.
AutoDoc test. Fails with: autodoc -t --verbose numbers.js TypeError: invalid data
(function (root, factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(factory);
} else {
root.genie = factory();
}
}(this, function() {
/**
* @private
* @examples
* isInteger(5) // => true
* isInteger(5.0) // => true
* isInteger(-5) // => true
* isInteger(3.14) // => false
* isInteger('foo') // => false
* isInteger(NaN) // => false
*/
function isInteger(x) {
return x === Math.floor(x);
}
return {
isInteger: isInteger
}
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment