Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

table-sort-js

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

table-sort-js

A JavaScript client-side HTML table sorting library with no dependencies required.

  • 1.8.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

table-sort-js table-sort-js table-sort-js table-sort-js table-sort-js

TABLE-SORT-JS.

  • Description: A JavaScript client-side HTML table sorting library with no dependencies required.

  • Demo

  • Documentation. (work in progress)

  • npm package.

Install instructions.

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 ReactJS.

Option 2. Download table-sort.js (Select save as.)

Then add the following script before your HTML table:

<script src="table-sort.js"></script>

Refer to the documenation for examples how to use table-sort-js with HTML.

To make tables sortable:
  • Add class="table-sort" to HTML <table> tags.
  • Click on table headers to sort columns.
Classes:
<table> classesDescription
"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> classesDescription
"order-by-desc"Order by descending on first click. (default is aescending)
"file-size"Sort file sizes(B->TiB) uses the binary prefix. (e.g KiB)
"data-sort"Sort by data attributes, e.g <td data-sort="42">
"disable-sort"Disallow sorting the table by this specific column
Development:

If you wish to contribute, install instructions can be found here.

Keywords

FAQs

Package last updated on 19 Feb 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc