Comparing version 0.2.1 to 0.2.2
# Change Log | ||
## [0.2.2] - 2018-01-11 | ||
* Upgrade `is-dom-node-list` dependency. | ||
## [0.2.1] - 2018-01-05 | ||
@@ -41,3 +45,4 @@ | ||
[0.2.1]: https://github.com/jlmakes/tealight/compare/2.0.0...0.2.1 | ||
[0.2.2]: https://github.com/jlmakes/tealight/compare/0.2.1...0.2.2 | ||
[0.2.1]: https://github.com/jlmakes/tealight/compare/0.2.0...0.2.1 | ||
[0.2.0]: https://github.com/jlmakes/tealight/compare/0.1.2...0.2.0 | ||
@@ -44,0 +49,0 @@ [0.1.2]: https://github.com/jlmakes/tealight/compare/0.1.1...0.1.2 |
@@ -1,2 +0,2 @@ | ||
/*! @license Tealight v0.2.1 | ||
/*! @license Tealight v0.2.2 | ||
@@ -24,12 +24,58 @@ Copyright 2018 Fisssion LLC. | ||
*/ | ||
function isNode(x) { | ||
/*! @license is-dom-node v1.0.2 | ||
Copyright 2018 Fisssion LLC. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
*/ | ||
function isDomNode(x) { | ||
return typeof window.Node === 'object' | ||
? x instanceof window.Node | ||
: x !== null && | ||
typeof x === 'object' && | ||
typeof x.nodeType === 'number' && | ||
typeof x.nodeName === 'string' | ||
typeof x === 'object' && | ||
typeof x.nodeType === 'number' && | ||
typeof x.nodeName === 'string' | ||
} | ||
function isNodeList(x) { | ||
/*! @license is-dom-node-list v1.1.0 | ||
Copyright 2018 Fisssion LLC. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
*/ | ||
function isDomNodeList(x) { | ||
var prototypeToString = Object.prototype.toString.call(x); | ||
@@ -41,6 +87,6 @@ var regex = /^\[object (HTMLCollection|NodeList|Object)\]$/; | ||
: x !== null && | ||
typeof x === 'object' && | ||
typeof x.length === 'number' && | ||
regex.test(prototypeToString) && | ||
(x.length === 0 || isNode(x[0])) | ||
typeof x === 'object' && | ||
typeof x.length === 'number' && | ||
regex.test(prototypeToString) && | ||
(x.length === 0 || (typeof x[0] === 'object' && x[0].nodeType > 0)) | ||
} | ||
@@ -51,5 +97,5 @@ | ||
if (target instanceof Array) { return target.filter(isNode) } | ||
if (isNode(target)) { return [target] } | ||
if (isNodeList(target)) { return Array.prototype.slice.call(target) } | ||
if (target instanceof Array) { return target.filter(isDomNode) } | ||
if (isDomNode(target)) { return [target] } | ||
if (isDomNodeList(target)) { return Array.prototype.slice.call(target) } | ||
if (typeof target === 'string') { | ||
@@ -56,0 +102,0 @@ try { |
@@ -1,2 +0,2 @@ | ||
/*! @license Tealight v0.2.1 | ||
/*! @license Tealight v0.2.2 | ||
@@ -30,12 +30,58 @@ Copyright 2018 Fisssion LLC. | ||
function isNode(x) { | ||
/*! @license is-dom-node v1.0.2 | ||
Copyright 2018 Fisssion LLC. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
*/ | ||
function isDomNode(x) { | ||
return typeof window.Node === 'object' | ||
? x instanceof window.Node | ||
: x !== null && | ||
typeof x === 'object' && | ||
typeof x.nodeType === 'number' && | ||
typeof x.nodeName === 'string' | ||
typeof x === 'object' && | ||
typeof x.nodeType === 'number' && | ||
typeof x.nodeName === 'string' | ||
} | ||
function isNodeList(x) { | ||
/*! @license is-dom-node-list v1.1.0 | ||
Copyright 2018 Fisssion LLC. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
*/ | ||
function isDomNodeList(x) { | ||
var prototypeToString = Object.prototype.toString.call(x); | ||
@@ -47,6 +93,6 @@ var regex = /^\[object (HTMLCollection|NodeList|Object)\]$/; | ||
: x !== null && | ||
typeof x === 'object' && | ||
typeof x.length === 'number' && | ||
regex.test(prototypeToString) && | ||
(x.length === 0 || isNode(x[0])) | ||
typeof x === 'object' && | ||
typeof x.length === 'number' && | ||
regex.test(prototypeToString) && | ||
(x.length === 0 || (typeof x[0] === 'object' && x[0].nodeType > 0)) | ||
} | ||
@@ -57,5 +103,5 @@ | ||
if (target instanceof Array) { return target.filter(isNode) } | ||
if (isNode(target)) { return [target] } | ||
if (isNodeList(target)) { return Array.prototype.slice.call(target) } | ||
if (target instanceof Array) { return target.filter(isDomNode) } | ||
if (isDomNode(target)) { return [target] } | ||
if (isDomNodeList(target)) { return Array.prototype.slice.call(target) } | ||
if (typeof target === 'string') { | ||
@@ -62,0 +108,0 @@ try { |
@@ -1,2 +0,2 @@ | ||
/*! @license Tealight v0.2.1 (MIT) Copyright 2018 Fisssion LLC. */ | ||
var tealight=function(){"use strict";function t(t){return"object"==typeof window.Node?t instanceof window.Node:null!==t&&"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName}return function(e,o){if(void 0===o&&(o=document),e instanceof Array)return e.filter(t);if(t(e))return[e];if(function(e){var o=Object.prototype.toString.call(e);return"object"==typeof window.NodeList?e instanceof window.NodeList:null!==e&&"object"==typeof e&&"number"==typeof e.length&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(o)&&(0===e.length||t(e[0]))}(e))return Array.prototype.slice.call(e);if("string"==typeof e)try{var n=o.querySelectorAll(e);return Array.prototype.slice.call(n)}catch(t){return[]}return[]}}(); | ||
/*! @license Tealight v0.2.2 (MIT) Copyright 2018 Fisssion LLC. */ | ||
var tealight=function(){"use strict";function t(t){return"object"==typeof window.Node?t instanceof window.Node:null!==t&&"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName}return function(e,o){if(void 0===o&&(o=document),e instanceof Array)return e.filter(t);if(t(e))return[e];if(n=e,r=Object.prototype.toString.call(n),"object"==typeof window.NodeList?n instanceof window.NodeList:null!==n&&"object"==typeof n&&"number"==typeof n.length&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(r)&&(0===n.length||"object"==typeof n[0]&&n[0].nodeType>0))return Array.prototype.slice.call(e);var n,r;if("string"==typeof e)try{var i=o.querySelectorAll(e);return Array.prototype.slice.call(i)}catch(t){return[]}return[]}}(); |
{ | ||
"name": "tealight", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Enhanced query selector API", | ||
@@ -22,2 +22,6 @@ "main": "dist/tealight.js", | ||
"keywords": ["html", "dom", "element", "utility", "query", "selector"], | ||
"dependencies": { | ||
"is-dom-node": "1.0.2", | ||
"is-dom-node-list": "1.1.0" | ||
}, | ||
"devDependencies": { | ||
@@ -24,0 +28,0 @@ "chai": "^4.1.2", |
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
15773
188
2
+ Addedis-dom-node@1.0.2
+ Addedis-dom-node-list@1.1.0
+ Addedis-dom-node@1.0.2(transitive)
+ Addedis-dom-node-list@1.1.0(transitive)