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

bulkjs

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bulkjs - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

0001-update-examples.patch

10

package.json
{
"name": "bulkjs",
"version": "0.1.5",
"version": "0.1.6",
"description": "manager for multiple selection.",
"main": "bulk.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha ./tests/test.js -w"
},

@@ -22,3 +22,7 @@ "repository": {

},
"homepage": "https://github.com/diasbruno/bulkjs#readme"
"homepage": "https://github.com/diasbruno/bulkjs#readme",
"devDependencies": {
"mocha": "^2.4.5",
"should": "^8.2.2"
}
}

@@ -1,4 +0,45 @@

bulkjs
======
# bulkjs
base for a manager for multiple selection.
## Example
```javascript
// the api.
var bulkAction = bulk(scope, {
// toId maps the object from the data source,
// to the unique id in the list.
toId: function(x) {
return x.uuid;
},
// updates will always be executed for any change,
// except when settings the 'dataSource'.
update: function(scope, event, eventName) {
// get the list of selected ids.
var selected = scope.bulkAction.list();
// if not 'all', unmark the all checkbox.
if (!scope.bulkAction.all()) {
all[0].checked = '';
} else {
all[0].checked = 'checked';
}
// mark as checked if the uuid is in the selected list.
scope.collection.map(function(o, k) {
var checked = selected.indexOf(o.uuid) > -1;
o.content.checked = checked ? 'checked' : '';
});
// display info.
if (scope.bulkAction.all()) {
sl.html("all");
} else {
if (selected.length > 0) {
sl.html(selected.join(","));
} else {
sl.html("none");
}
}
}
});
```
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