Comparing version 1.0.3 to 1.0.4
@@ -13,8 +13,8 @@ module.exports = function(grunt) { | ||
' * @copyright <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>\n' + | ||
' * <%= pkg.homepage %>\n' + | ||
' * @see <%= pkg.homepage %>\n' + | ||
' */\n' | ||
}, | ||
build: { | ||
src: '<%= pkg.name %>.js', | ||
dest: '<%= pkg.name %>.min.js' | ||
src: '<%= pkg.main %>.js', | ||
dest: '<%= pkg.main %>.min.js' | ||
} | ||
@@ -53,3 +53,3 @@ }, | ||
// Development | ||
grunt.registerTask('dev', ['default', 'watch']); | ||
grunt.registerTask('build', ['default', 'watch']); | ||
@@ -56,0 +56,0 @@ // Testing |
12
kind.js
/** @description Precise type-checker for JavaScript | ||
* @version 1.0.3 | ||
* @date 2015-02-28 | ||
* @copyright 2014 | ||
* https://github.com/patik/kind | ||
* @version 1.0.4 | ||
* @date 2015-03-20 | ||
* @copyright 2015 | ||
* @see https://github.com/patik/kind | ||
*/ | ||
@@ -10,4 +10,4 @@ | ||
(function (name, definition) { | ||
if (typeof define === "function" && define.amd) { | ||
define(definition); | ||
if (typeof define === 'function' && define.amd) { | ||
define([], definition); | ||
} | ||
@@ -14,0 +14,0 @@ // Fall back to a global variable |
/*! @description Precise type-checker for JavaScript | ||
* @version 1.0.3 | ||
* @date 2015-02-28 | ||
* @version 1.0.4 | ||
* @date 2015-03-20 | ||
* @copyright 2015 | ||
* https://github.com/patik/kind | ||
* @see https://github.com/patik/kind | ||
*/ | ||
!function(a,b){"function"==typeof define&&define.amd?define(b):window[a]=b()}("kind",function(){var a=function(a,b){var c,d,e,f;if(null===a)return"null";if(/^function$|^undefined$|^boolean$/.test(typeof a))return typeof a;if(/^string$|^number$/.test(typeof a)){if(!b)return typeof a;if("string"==typeof a)return a.length?"string":"emptystring";if("number"==typeof a){if(parseInt(a,10)===a)return"integer";if(parseFloat(a)===a)return"float"}}if("object"==typeof a){for(c=Object.prototype.toString.call(a),d=["Math","ErrorEvent","Error","Date","RegExp","Event","Array"],f=d.length;f--;)if(c==="[object "+d[f]+"]")return d[f].toLowerCase();return/\[object\s(\w+Event)\]/.test(c)?b?/\[object\s(\w+Event)\]/.exec(c)[1].toLowerCase():"event":"object"==typeof HTMLElement&&a instanceof HTMLElement?"element":"string"==typeof a.nodeName&&1===a.nodeType?"element":(e={1:"element",2:"attribute",3:"text",4:"cdata",5:"entityreference",6:"entity",7:"processinginstruction",8:"comment",9:"document",10:"documenttype",11:"documentfragment",12:"notation"},"object"==typeof Node&&a instanceof Node?b&&a.nodeType.toString()in e?e[a.nodeType]:"node":"number"==typeof a.nodeType&&"string"==typeof a.nodeName?b&&a.nodeType.toString()in e?e[a.nodeType]:"node":/^\[object (HTMLCollection|NodeList|Object)\]$/.test(c)&&"number"==typeof a.length&&"undefined"!=typeof a.item&&(0===a.length||"object"==typeof a[0]&&a[0].nodeType>0)?"nodelist":"number"==typeof a.length&&a!==window?"arraylike":"object")}return"unknown"};return a}); | ||
!function(a,b){"function"==typeof define&&define.amd?define([],b):window[a]=b()}("kind",function(){var a=function(a,b){var c,d,e,f;if(null===a)return"null";if(/^function$|^undefined$|^boolean$/.test(typeof a))return typeof a;if(/^string$|^number$/.test(typeof a)){if(!b)return typeof a;if("string"==typeof a)return a.length?"string":"emptystring";if("number"==typeof a){if(parseInt(a,10)===a)return"integer";if(parseFloat(a)===a)return"float"}}if("object"==typeof a){for(c=Object.prototype.toString.call(a),d=["Math","ErrorEvent","Error","Date","RegExp","Event","Array"],f=d.length;f--;)if(c==="[object "+d[f]+"]")return d[f].toLowerCase();return/\[object\s(\w+Event)\]/.test(c)?b?/\[object\s(\w+Event)\]/.exec(c)[1].toLowerCase():"event":"object"==typeof HTMLElement&&a instanceof HTMLElement?"element":"string"==typeof a.nodeName&&1===a.nodeType?"element":(e={1:"element",2:"attribute",3:"text",4:"cdata",5:"entityreference",6:"entity",7:"processinginstruction",8:"comment",9:"document",10:"documenttype",11:"documentfragment",12:"notation"},"object"==typeof Node&&a instanceof Node?b&&a.nodeType.toString()in e?e[a.nodeType]:"node":"number"==typeof a.nodeType&&"string"==typeof a.nodeName?b&&a.nodeType.toString()in e?e[a.nodeType]:"node":/^\[object (HTMLCollection|NodeList|Object)\]$/.test(c)&&"number"==typeof a.length&&"undefined"!=typeof a.item&&(0===a.length||"object"==typeof a[0]&&a[0].nodeType>0)?"nodelist":"number"==typeof a.length&&a!==window?"arraylike":"object")}return"unknown"};return a}); |
{ | ||
"name": "kindjs", | ||
"description": "Precise type-checker for JavaScript", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"main": "kind", | ||
@@ -6,0 +6,0 @@ "author": "Craig Patik <craig@patik.com> (http://patik.com)", |
@@ -19,4 +19,14 @@ # Kind | ||
## Installation | ||
**npm**: `npm install kindjs` | ||
**Bower**: `bower install kind` | ||
Or just download [kind.js](https://github.com/patik/kind/blob/master/kind.js) and reference it in your page with a `<script>` tag. | ||
## Usage | ||
Available as a CommonJS module (e.g with RequireJS) or as a global method, `kind()`. | ||
### Basic | ||
@@ -23,0 +33,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14162
107