1.0.1 • Published 9 years ago

jsmicro-is-function v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

JSMicro - Is Function

isFunction(object)

Check does the given Javascript Object (array, object, string, etc) is a function.

isNotFunction(object)

Check does the given Javascript Function (array, object, string, etc) is not a function.

Browser Usage

bower install --save jsmicro-is-function
<script type="text/javascript" src="bower_components/jsmicro-is-function/index.js">
<script type="text/javascript">
    var obj = function() {};
    var nbr = 200;

    // Available in the window object.
    isFunction(obj);      // true
    isFunction(nbr);      // false
    isNotFunction(nbr);   // true
</script>

NodeJS Usage

npm install --save jsmicro-is-function
const obj = require('jsmicro-is-function');

// Available in the global object.
isFunction(function() {}); // true
isFunction(23322333); // false
isNotFunction(23234); // true

// Also available in the export object.
obj.isFunction(function() {}); // true
obj.isFunction(23322333); // false
obj.isNotFunction(23333); // true

Changelogs

v1.0.1 - May 21, 2016

  • Added .npmignore

v1.0.0 - May 19, 2016

  • Initial release.

The MIT License (MIT)