Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
table-sort-js
Advanced tools
A JavaScript client-side HTML table sorting library with no dependencies required.
Description: A JavaScript client-side HTML table sorting library with no dependencies required.
Documentation. (work in progress)
Option 1. Install from npm: npm install table-sort-js
import tableSort from "table-sort-js/table-sort.js";
Refer to the documentation for examples on using table-sort-js with frontend frameworks such as React.js and Vue.js
Option 2. Download table-sort.js (Select save as.), or download a minified version (~5kB)
Then add the following script before your HTML table:
<script src="table-sort.js"></script>
Refer to the documenation for examples on how to use table-sort-js with HTML
class="table-sort"
to HTML <table> tags.<table> classes | Description |
---|---|
"table-sort" | Make the table sortable! (Words, numbers, dates) |
"table-arrows" | Display ascending or descending triangles. |
"remember-sort" | If clicking on different columns remembers sort of the original column. |
<th> classes | Description |
---|---|
"order-by-desc" | Order by descending on first click. (default is aescending) |
"data-sort" | Sort by data attributes, e.g <td data-sort="42"> |
"onload-sort" | Sort column on loading of the page. Simulates a click from the user. (can only sort onload for one column) |
"file-size-sort" | Sort file sizes(B->TiB) uses the binary prefix. (e.g KiB) |
"disable-sort" | Disallow sorting the table by this specific column. |
"alpha-sort" | Sort alphabetically (z11,z2); default is natural sort (z2,z11). |
"punct-sort" | Sort punctuation; default ignores punctuation. |
If you wish to contribute, install instructions can be found here.
FAQs
A JavaScript client-side HTML table sorting library with no dependencies required.
We found that table-sort-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.