Socket
Book a DemoInstallSign in
Socket

storm-check-all

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storm-check-all

Checkbox group state management

0.1.1
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Storm Check All

Checkbox group state management.

Check and uncheck a group of checkboxes, update the toggle button/input label, and dispatch a change event on each checkbox.

Usages

HTML

<label for="check-all">Check all</label>
<input class="js-check__all" type="checkbox" id="check-all" data-group="group-1">

<label>
    <input data-group-name="group-1" name="..." id="..." value="1">
</label>
<label>
    <input data-group-name="group-1" name="..." id="..." value="2">
</label>

JS either using es6 import

import CheckAll from 'storm-check-all';

CheckAll.init('.js-check__all');

aynchronous browser loading (use the .standalone version in the /dist folder)

import Load from 'storm-load';

Load('/content/js/async/storm-check-all.standalone.js')
    .then(() => {
        StormCheckAll.init('.js-check__all');
    });

Options

{
    defaultLabel: 'Check all' //this should match the label in the DOM
    activeLabel: 'Uncheck all',
}

Browser support

This is module has both es6 and es5 distributions. The es6 version should be used in a workflow that transpiles.

The es5 version depends upon Object.assign so all evergreen browsers are supported out of the box, ie9+ is supported with polyfills. ie8+ will work with even more polyfils for Array functions and eventListeners.

Dependencies

None

License

MIT

Keywords

stormid

FAQs

Package last updated on 17 May 2018

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.