Socket
Socket
Sign inDemoInstall

selection-manager

Package Overview
Dependencies
0
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    selection-manager

Single Selection and Multi Selection handler for JavaScript objects, each object is expected to have unique `id` attribute defined


Version published
Weekly downloads
89
increased by48.33%
Maintainers
2
Install size
27.3 kB
Created
Weekly downloads
 

Readme

Source

selection-manager

Single Selection and Multi Selection handler for JavaScript objects, each object is expected to have unique id attribute defined

#Usage



var Selection = require('selection-manager');

var singleSelect = new Selection();
singleSelect.on('change', function(selected, prevSelected){
    console.log(selected);
})
singleSelect.select({id:1, name:'name1'})



var multiSelect = new Selection({multiSelect:true});

multiSelect.on('change', function(selected, prevSelected){
    console.log(selected);
})


multiSelect.select({id:1, name:'name1'})
multiSelect.select({id:2, name:'name2'})


FAQs

Last updated on 22 May 2018

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc