A very small, modular DOM utility for modern web apps.
Hobo core is only 7k minified and just 11k minified with all extended methods built in! Gzip and you're doing even better!
View the jsdocs for hobo.
Install hobo as a package dependency.
npm install properjs-hobo --save-dev
Import hobo into your app.
If you only want to use hobo core then you are done. See the next section for custom builds.
You can also create custom hobo builds with any of the available extended methods. First add a
postinstall script to your
package.json. Something like this:
"scripts":"postinstall": "cd ./node_modules/properjs-hobo && npm install && npm run build -- 'is eq not attr filter detach remove append'"
This is the easiest way to manage your custom hobo builds. If you ever want to add or remove a method just add it to the list and rum
npm run postinstall.
The small, powerful core methods that get the job done.
- on() - supports
- ajax() - supports
Core - Native Array
These are swiped from the Array prototype for zero overhead.
- forEach() - alias available as
These are methods that can make hobo even more powerful.
If you are familiar with libraries like jQuery then hobo will be real easy.
;// Hobo gives you a chainable method wrapper// Events// Datadatadata "key"data "key" "value"datakey: "value"and: 1 2 3// ClassNames// Querying;// Hobo gives you utility methods for XHR and Promise.// Hobo loves promises, so the ajax method returns one.$;
Testing / Support
Hobo is tested in Chrome 48.0.2564.116+, Firefox 44.0.2+, Safari 9.0.3+, IE 10+, iOS Mobile Safari 8.4+, Android 4.4.4+