{"id":18735645,"url":"https://github.com/rdmurphy/tablesift.js","last_synced_at":"2025-04-12T19:21:05.627Z","repository":{"id":58227921,"uuid":"12419482","full_name":"rdmurphy/tablesift.js","owner":"rdmurphy","description":"Sorting HTML tables quickly.","archived":false,"fork":false,"pushed_at":"2014-08-28T21:09:51.000Z","size":286,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T17:54:45.618Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rdmurphy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-27T22:52:59.000Z","updated_at":"2018-07-12T11:05:50.000Z","dependencies_parsed_at":"2022-08-31T08:42:18.299Z","dependency_job_id":null,"html_url":"https://github.com/rdmurphy/tablesift.js","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdmurphy%2Ftablesift.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdmurphy%2Ftablesift.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdmurphy%2Ftablesift.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdmurphy%2Ftablesift.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rdmurphy","download_url":"https://codeload.github.com/rdmurphy/tablesift.js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618633,"owners_count":21134273,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T15:17:38.147Z","updated_at":"2025-04-12T19:21:05.593Z","avatar_url":"https://github.com/rdmurphy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"TableSift\n=========\n\nLet's get this party started.\n\n![Siftin'](http://i.imgur.com/pg46mZ8.gif)\n\nHow to Use\n----------\n\n```js\nTableSift.init(\u003cid of table\u003e (str) -or- \u003creference to table\u003e (HTMLTableElement), \u003coptions\u003e (object));\n```\n\n**Default options**\n\n```js\n{\n    classAsc: 'sift-asc',  // class applied to columns sorted ascending\n    classDes: 'sift-des',  // class applied to columns sorted descending\n    customSort: {},  // custom functions to parse a column's cells, none by default\n    noSort: [],  // don't active a sort feature on provided column indexes, none by default\n    removeChars: [',', '$']  // ignore these characters when determining value for sort\n}\n```\n\n**Different class names for sorted columns**\n```js\n{\n    classAsc: 'sorted-a',\n    classDes: 'sorted-d'\n}\n```\n\n**Custom sorter for column index 2, parses number from a cell's text content**\n```js\n{\n    customSort: {\n        2: function(con, el) {  // 'con' == the cell's text, 'el' == the actual cell element\n            return +con.match(/\\d+/)[0];  // regex to find number in string, pull it out, and convert to number\n        }\n    }\n}\n```\n\n**Don't enable sorting for column index 3**\n```js\n{\n    noSort: [3]  // can take comma-delimited entry\n}\n```\n\n**removeChars**\n```js\n{\n    removeChars: [',', '£']  // comma-delimited characters to ignore; for example, pounds instead of dollars\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdmurphy%2Ftablesift.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frdmurphy%2Ftablesift.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdmurphy%2Ftablesift.js/lists"}