Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

traversty

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

traversty - npm Package Compare versions

Comparing version
0.0.5
to
0.0.6
+20
buster.js
var config = module.exports
config['Traversty Tests'] = {
environment: 'browser'
, sources: [
'./test/vendor/qwery.js'
, './test/vendor/qwery_pseudos.js'
, './test/vendor/sizzle.js'
, './test/vendor/nwmatcher.js'
, './test/vendor/es5-basic_mod.js'
, './test/vendor/sel.js'
, './test/noconflict.js'
, './src/traversty.js'
, './test/setup.js'
, './test/common.js'
]
, tests: [
'./test/*-test.js'
]
}
+1
-1

@@ -44,3 +44,3 @@ var jshintOptions = {

, 'tests': [
'./test/buster.js'
'./buster.js'
, './test/common.js'

@@ -47,0 +47,0 @@ , './test/core-test.js'

{
"name": "traversty"
, "description": "Library agnostic utility for traversing the DOM"
, "version": "0.0.5"
, "version": "0.0.6"
, "homepage": "https://github.com/rvagg/traversty"

@@ -6,0 +6,0 @@ , "author": "Rod Vagg <rod@vagg.org> @rvagg"

@@ -134,3 +134,3 @@ Traversty &mdash; headache-free DOM traversal

You'll have to make do with the integration tests. [Here](http://rvagg.github.com/traversty/test/integration/ender_qwery.html) is Traversty running in an Ender build with Qwery and Bonzo and [here](http://rvagg.github.com/traversty/test/integration/ender_sel.html) is the same but with Sel instead of Qwery as the selector engine. There is also a version with no selector engine installed, which will work on most modern browsers (including IE9+) [here](http://rvagg.github.com/traversty/test/integration/ender_noselector.html).
You'll have to make do with the integration tests. [Here](http://rvagg.github.com/traversty/test/integration/ender_qwery.html) is Traversty running in an Ender build with Qwery and Bonzo. You can also see it running with [Sel](http://rvagg.github.com/traversty/test/integration/ender_sel.html), [Sizzle](http://rvagg.github.com/traversty/test/integration/ender_sizzle.html), [NWMatcher](http://rvagg.github.com/traversty/test/integration/ender_nwmatcher.html) and [without a selector engine](http://rvagg.github.com/traversty/test/integration/ender_sel.html) (works in modern browsers, including IE9+).

@@ -137,0 +137,0 @@ View-source to see what it's doing, note that it's operating on 2 lists at the same time.

@@ -17,4 +17,3 @@ !(function (name, definition) {

if (el[ms = pfx[i++] + name]) return ms
if (el[name = 'm' + name.substring(1)]) return name
}(html, [ 'ms', 'webkit', 'moz', 'o' ], 'MatchesSelector', 0))
}(html, [ 'msM', 'webkitM', 'mozM', 'oM', 'm' ], 'atchesSelector', 0))

@@ -21,0 +20,0 @@ , isNumber = function (o) {

@@ -23,4 +23,3 @@ /**************************************************************

if (el[ms = pfx[i++] + name]) return ms
if (el[name = 'm' + name.substring(1)]) return name
}(html, [ 'ms', 'webkit', 'moz', 'o' ], 'MatchesSelector', 0))
}(html, [ 'msM', 'webkitM', 'mozM', 'oM', 'm' ], 'atchesSelector', 0))

@@ -27,0 +26,0 @@ , isNumber = function (o) {

@@ -6,2 +6,2 @@ /**************************************************************

*/
!function(a,b){typeof module!="undefined"?module.exports=b():typeof define=="function"&&define.amd?define(a,b):this[a]=b()}("traversty",function(){var a=this,b=a.traversty,c=window.document,d=c.documentElement,e=Object.prototype.toString,f=Array.prototype.slice,g=function(a,b,c,d,e){while(d<b.length)if(a[e=b[d++]+c])return e;if(a[c="m"+c.substring(1)])return c}(d,["ms","webkit","moz","o"],"MatchesSelector",0),h=function(a){return e.call(a)==="[object Number]"},i=function(a){return e.call(a)==="[object String]"},j=function(a){return e.call(a)==="[object Function]"},k=function(a){return a===void 0},l=function(a){return a&&a.nodeType===1},m=function(a,b){return k(a)&&!h(b)?0:h(a)?a:h(b)?b:null},n=function(a){return i(a)?a:"*"},o=function(a,b){return f.call(b.querySelectorAll(a),0)},p=function(a,b){return a==="*"||b[g](a)},q=o,r=p,s=function(a,b){return function(c,d){if(/,/.test(c)){var e=[],f=-1,g=d.getElementsByTagName("*");while(++f<g.length)l(g[f])&&b(c,g[f])&&e.push(g[f]);return e}return a(c,d)}},t=function(a){var b=[],c=-1,d,e;while(++c<a.length){d=-1,e=!1;while(++d<b.length)if(b[d]===a[c]){e=!0;break}e||b.push(a[c])}return b},u=function(a,b){var c=[],d=0,e=a.length;while(d<e)c=c.concat(b(a[d++]));return c},v=function(a,b,c,d){return d=m(c,d),c=n(c),u(a,function(a){var e=d||0,f=[];while(a&&(d===null||e>=0))a=a[b],l(a)&&r(c,a)&&(d===null||e--===0)&&(d===null&&b!=="nextSibling"?f=[a].concat(f):f.push(a));return f})},w=function(){function d(a){this.length=0;if(a){a=t(!a.nodeType&&!k(a.length)?a:[a]);var b=this.length=a.length;while(b--)this[b]=a[b]}}function e(a){return new d(i(a)?q(a,c):a)}return d.prototype={down:function(a,b){return b=m(a,b),a=n(a),w(u(this,function(c){var d=q(a,c);return b===null?d:[d[b]]||[]}))},up:function(a,b){return w(v(this,"parentNode",a,b))},previous:function(a,b){return w(v(this,"previousSibling",a,b))},next:function(a,b){return w(v(this,"nextSibling",a,b))}},e.setSelectorEngine=function(a){var b,d,e,f,g,h=c.createElement("p"),k=a.select||a.sel||a;h.innerHTML="<a/><i/><b/>",e=h.firstChild;try{f=j(a.matching)?function(b,c){return a.matching([c],b).length>0}:j(a.is)?function(b,c){return a.is(c,b)}:j(a.matchesSelector)?function(b,c){return a.matchesSelector(c,b)}:j(a.match)?function(b,c){return a.match(c,b)}:null,f||(b=a("a",h),f=j(b.matching)?function(b,c){return a(c).matching(b).length>0}:j(b.is)?function(b,c){return a(c).is(b)}:j(b.matchesSelector)?function(b,c){return a(c).matchesSelector(b)}:j(b.match)?function(b,c){return a(c).match(b)}:null);if(!f)throw"Traversty: couldn't find selector engine's `matchesSelector`";if(f("x,y",h)||!f("a,p",h))throw"Traversty: couldn't make selector engine's `matchesSelector` work";if((d=k("b,a",h)).length!==2)throw"Traversty: don't know how to use this selector engine";g=d[0]===e?k:s(k,f);if((d=g("b,a",h)).length!==2||d[0]!==e)throw"Traversty: couldn't make selector engine work";r=f,q=g}catch(l){throw i(l)?l:"Traversty: error while figuring out how the selector engine works: "+(l.message||l)}finally{h=null}},e.noConflict=function(){return a.traversty=b,this},e}();return w})
!function(a,b){typeof module!="undefined"?module.exports=b():typeof define=="function"&&define.amd?define(a,b):this[a]=b()}("traversty",function(){var a=this,b=a.traversty,c=window.document,d=c.documentElement,e=Object.prototype.toString,f=Array.prototype.slice,g=function(a,b,c,d,e){while(d<b.length)if(a[e=b[d++]+c])return e}(d,["msM","webkitM","mozM","oM","m"],"atchesSelector",0),h=function(a){return e.call(a)==="[object Number]"},i=function(a){return e.call(a)==="[object String]"},j=function(a){return e.call(a)==="[object Function]"},k=function(a){return a===void 0},l=function(a){return a&&a.nodeType===1},m=function(a,b){return k(a)&&!h(b)?0:h(a)?a:h(b)?b:null},n=function(a){return i(a)?a:"*"},o=function(a,b){return f.call(b.querySelectorAll(a),0)},p=function(a,b){return a==="*"||b[g](a)},q=o,r=p,s=function(a,b){return function(c,d){if(/,/.test(c)){var e=[],f=-1,g=d.getElementsByTagName("*");while(++f<g.length)l(g[f])&&b(c,g[f])&&e.push(g[f]);return e}return a(c,d)}},t=function(a){var b=[],c=-1,d,e;while(++c<a.length){d=-1,e=!1;while(++d<b.length)if(b[d]===a[c]){e=!0;break}e||b.push(a[c])}return b},u=function(a,b){var c=[],d=0,e=a.length;while(d<e)c=c.concat(b(a[d++]));return c},v=function(a,b,c,d){return d=m(c,d),c=n(c),u(a,function(a){var e=d||0,f=[];while(a&&(d===null||e>=0))a=a[b],l(a)&&r(c,a)&&(d===null||e--===0)&&(d===null&&b!=="nextSibling"?f=[a].concat(f):f.push(a));return f})},w=function(){function d(a){this.length=0;if(a){a=t(!a.nodeType&&!k(a.length)?a:[a]);var b=this.length=a.length;while(b--)this[b]=a[b]}}function e(a){return new d(i(a)?q(a,c):a)}return d.prototype={down:function(a,b){return b=m(a,b),a=n(a),w(u(this,function(c){var d=q(a,c);return b===null?d:[d[b]]||[]}))},up:function(a,b){return w(v(this,"parentNode",a,b))},previous:function(a,b){return w(v(this,"previousSibling",a,b))},next:function(a,b){return w(v(this,"nextSibling",a,b))}},e.setSelectorEngine=function(a){var b,d,e,f,g,h=c.createElement("p"),k=a.select||a.sel||a;h.innerHTML="<a/><i/><b/>",e=h.firstChild;try{f=j(a.matching)?function(b,c){return a.matching([c],b).length>0}:j(a.is)?function(b,c){return a.is(c,b)}:j(a.matchesSelector)?function(b,c){return a.matchesSelector(c,b)}:j(a.match)?function(b,c){return a.match(c,b)}:null,f||(b=a("a",h),f=j(b.matching)?function(b,c){return a(c).matching(b).length>0}:j(b.is)?function(b,c){return a(c).is(b)}:j(b.matchesSelector)?function(b,c){return a(c).matchesSelector(b)}:j(b.match)?function(b,c){return a(c).match(b)}:null);if(!f)throw"Traversty: couldn't find selector engine's `matchesSelector`";if(f("x,y",h)||!f("a,p",h))throw"Traversty: couldn't make selector engine's `matchesSelector` work";if((d=k("b,a",h)).length!==2)throw"Traversty: don't know how to use this selector engine";g=d[0]===e?k:s(k,f);if((d=g("b,a",h)).length!==2||d[0]!==e)throw"Traversty: couldn't make selector engine work";r=f,q=g}catch(l){throw i(l)?l:"Traversty: error while figuring out how the selector engine works: "+(l.message||l)}finally{h=null}},e.noConflict=function(){return a.traversty=b,this},e}();return w})
var config = module.exports
config['Traversty Tests'] = {
environment: 'browser'
, sources: [
'vendor/qwery.js'
, 'vendor/qwery_pseudos.js'
, 'vendor/sizzle.js'
, 'vendor/nwmatcher.js'
, 'vendor/es5-basic_mod.js'
, 'vendor/sel.js'
, 'noconflict.js'
, '../src/traversty.js'
, 'setup.js'
, 'common.js'
]
, tests: [
'*-test.js'
]
}