Skip to content

Dabby.js v0.9.15

Latest
Compare
Choose a tag to compare
@hexydec hexydec released this 16 Nov 23:04
· 39 commits to master since this release

This release fixes a number of bugs, improves code optimisation, and adds some documentation:

  • Updated $.fn.attr() to use a switch statement
  • Optimised code in $() to do less work when no context is specified
  • The functions for $.isPlainObject(), $.isWindow(), $.isPLainObject(), and $.parseHTML() are now stored as standalone methods the internal folder, this is because they are used by dabby.js and did cause circular references
  • Rewired all usage of the above functions to use the internal methods
  • Updated dabby.js to only filter nodes by type in a single place and to check items are nodes by using instanceof instead of checking for the nodeType property
  • Fixed issue with how context is handled in dabby.js, it was handled manually and if there were no nodes it would be ignored. It is now parsed as a dabby object, and if the context is empty, this will now result in an empty dabby object being returned
  • Fixed issue in dabby.js where if you passed a dabby object as the selector, it would just return that object, whereas it should copy the nodes to a new object
  • Simplified the proxy object to not allow numeric or the length property to be always writeable.
  • The length property is now read only as it is only written when a dabby object is created.
  • Removed $.each() and $.fn.each() from core.js as it is not used
  • Added dependencies to $.each() and $.fn.each() now it is not included in core
  • Fixed bug in $.fn.wrapall() where isfunction.js wasn't imported correctly
  • Fixed bug in $.fn.extend() where the method was a arrow function so don't have a scope.
  • Updated class.js to use slice() instead of substr() as it requires less code and is not deprecated
  • Optimised loops in $.fn.off()
  • Fixed issue in camelise() where it shouldn't change the case of CSS variables
  • Updated code to use includes() instead of indexOf() where possible
  • Updated files that contain multiple methods to use the index to determine the method instead of string checks
  • Fixed bug in $.fn.prop() where the current value in the callback may not have the correct prop name
  • Fixed bug in $.fn.val() and $.fn.offset() where the current value was called on a node rather than a dabby object
  • $.fn.offsetParent() now creates an empty dabby object if there are no nodes in the collection, whereas previously it passed null
  • Optimised $.fn.scrollTop()/$.fn.scrollLeft() to remove special code for the window object, as it is not needed
  • Fixed bug in getProp() where the input property might not be lowercased
  • Improved isFunction()
  • Fixed bug in isWindow() where a check for null shouldn't be strict to cover undefined
  • Updated Node type constants to use numbers
  • Fixed bug in $.each() where it should have iterated over objects with a length parameter as if it was an array
  • Various code improvements/optimisations
  • Updated build minifier to use Terser instead of Babel minify and uglify.
  • Updated README.md to show correct start file and how to use attributes when creating elements
  • Updated package qunitjs to be qunit as its name has changed
  • Updated tests to include the new qunit
  • Added tests for bugs
  • Added new documentation
  • Pruned and Updated dependencies
  • Fixed issues with the benchmark suite
  • Bumped version to 0.9.15