Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
sails-hook-datatable
Advanced tools
Readme
A sails hook for working with Jquery datatables.
npm i sails-hook-datatable --save
This hook supports jquery DataTables 1.10+. If your working with a legacy version, see https://datatables.net/manual/server-side#Legacy for congiuration.
Send a GET
or POST
to /datatable/:model
to use
NOTE: Always set column.data
as showing in example below as sails.js
Always respond with an array of object [{"name":"foo"}, {"name":"bar"}]]
not literals like
[["boy","foo"], ["girl","bar"]]
. You can also set column.data = country.state.city
where country
is the column name. This would be handle well by both this hook and datatable.
//Example where *account* is the model name
//ajax
$('#example').DataTable( {
serverSide: true,
ajax: {
url: '/datatable/account',
type: 'POST'
},
"columns": [
{ "data": "name" },
{ "data": "country.state"}
]
} );
//response
{
"draw": 1,
"recordsTotal": 57,
"recordsFiltered": 57,
"data": [
{name: 'Damian', country: {state: "New york"}},
{name: 'Sam', country: {state: "Benin"}},
{name: 'Robophil', country: {state: "London"}},
{name: 'Ovie', country: {state: "Paris"}}
]
}
To view attributes in a model, send a GET
to /datatable/column-names/:model
to fetch the attributes for that model. See response below
{ columns: [
'id', 'firstname', 'lastname'
]}
Create an issue to mention a bug or feature request. Fixed something? Send a PR
MIT
FAQs
A sails hook for working with jquery datatable
The npm package sails-hook-datatable receives a total of 0 weekly downloads. As such, sails-hook-datatable popularity was classified as not popular.
We found that sails-hook-datatable demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.