# v-sortable-data

> a vue directive for sorting tables using data attributes

Latest version **1.0.2** (published 2016-12-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install v-sortable-data
pnpm add v-sortable-data
yarn add v-sortable-data
bun add v-sortable-data
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2016-12-16 |
| First published | 2016-11-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | vin maimone |
| Maintainers | vmaimone |

## Links

- npm: https://www.npmjs.com/package/v-sortable-data
- Repository: https://github.com/vmaimone/v-sortable-data
- Homepage: https://github.com/vmaimone/v-sortable-data#readme
- Issues: https://github.com/vmaimone/v-sortable-data/issues
- npm.io page: https://npm.io/package/v-sortable-data

## Recent versions

- 1.0.2 (latest) — 2016-12-16
- 1.0.1 — 2016-11-27
- 1.0.0 — 2016-11-26
- 0.0.2 — 2016-11-25
- 0.0.1 — 2016-11-25

## README

# v-sortable-data
A Vue directive for sorting tables using data attributes

Demo: [https://vmaimone.github.io/v-sortable-data](https://vmaimone.github.io/v-sortable-data)

# example

### js
```script
// commonjs
const sortable = require('v-sortable-data')
//browser
const sortable = window.vSortable

new Vue({
  directives: { sortable },
  data: {
    tableData: [
      { name: 'bill', age: 28, dob: new Date('11/1/1988') },
      { name: 'frank', age: 30, dob: new Date('10/13/1986') },
      { name: 'steve', age: 23, dob: new Date('3/12/1993') }
    ]
  }
})
```
### html
```script
<table>
  <thead>
    <tr v-sortable="tableData">
      <th data-column="name">Name</th>
      <th data-column="dob">Birthday</th>
      <th data-column="age">Age</th>
    </tr>
  </thead>
  <tbody>
    <tr v-for="person in tableData">
      <td>{{person.name}}</td>
      <td>{{person.dob}}</td>
      <td>{{person.age}}</td>
    </tr>
  </tbody>
 </table>
```

---
_Source: https://npm.io/package/v-sortable-data · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
