Lightweight sorting of tables.
[data-sort] attributes to the
th elements in columns you’d like to sort a table by, include ~1kB of JS & CSS, and initialise with
sorter() – and that’s it!
For installation instructions and more customisation options, you can check out the readme file.
Keeping your classes immutable and stateless makes your code way less prone to bugs. Yet somehow this clean code rule isn’t as popular and as often invoked as SRP, YAGNI, DRY, KISS and others... Maybe it’s because of the lack of a catchy acronym?
Anyways, I’d like to take a look at two examples of when sticking to this rule could save your ass (or at least save you some time debugging).