ƒu.js - The Functional DOM traversing library.
tsenart.github.com
ƒu.js - The Functional DOM traversing library.
1–10 of 47 posts
Re: ƒu.js - The Functional DOM traversing library.
#2Re: ƒu.js - The Functional DOM traversing library.
#3I like one-file less-than-100-LOC type libs.
Re: ƒu.js - The Functional DOM traversing library.
#4Re: ƒu.js - The Functional DOM traversing library.
#5Am I missing something here or do I really have to type the weird curly-F every time I want to call this? Having charmap open in my taskbar is not my idea of being productive. Plus, from my cursory glance this looks pretty similar, if not almost identical, to jQuery...
Re: ƒu.js - The Functional DOM traversing library.
#6Re: ƒu.js - The Functional DOM traversing library.
#7At the very least you could link to the previous discussion, no?
Re: ƒu.js - The Functional DOM traversing library.
#8tsenart, you submitted the same thing two days ago: http://news.ycombinator.com/item?id=2146944 At the very least you could link to the previous discussion, no?
Re: ƒu.js - The Functional DOM traversing library.
#9tsenart, you submitted the same thing two days ago: http://news.ycombinator.com/item?id=2146944 At the very least you could link to the previous discussion, no?
Re: ƒu.js - The Functional DOM traversing library.
#10You also seem to be checking `typeof value.length == 'number' && typeof value.splice != 'undefined' && !value.propertyIsEnumerable('length')` to determine if something is an Array. First of all, the recommended practice is to check Object.prototype.toString.call(value) === "[object Array]", but since you're going to rely on latest browsers supporting querySelector{All}, you might as well use Array.isArray.
I'm sorry for being so harsh, but this is the most worthless library I have ever seen. You're adding an extremely thin and pointless layer of abstraction to querySelectorAll and polluting the global namespace with four globals, three of which are completely identitcal, and two of which take too much effort to type. Not to mention your use of worst practices (such as using eval(), only loose comparisons, wrapping all of your code in try..catch statements instead of just not doing things that will throw errors, etc.) and your prototypical pollution in Array, Document, and Element. For example, you define Array.prototype.flatten for internal use. You shouldn't pollute global prototypes for something that you can do privately.