
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
stimulus-conductor
Advanced tools
An optionated Stimulus Controller to easily manage parent/children controllers
👩👧👦 👨👧👦 : A simple Stimulus Controller to manage Parent/Children controllers with simple conventions
items controller has many item controllersitem controllers belong to an items controllerThis assumes that you have Stimulus already installed.
In your project just add the stimulus-conductor package.
$ yarn add stimulus-conductor
or
$ npm i stimulus-conductor
There is a single convention to remember to use this package:
Parent conductor is the plural of the children items name
todocontrollers are conducted by atodoscontrolleritemcontrollers are conducted by anitemscontrollerchartcontrollers are conducted by achartscontroller
<div data-controller="items">
<div data-controller="item"></div>
<div data-controller="item"></div>
<div data-controller="item"></div>
</div>
stimulus-conductor// ./controllers/items_controller.js
import Conductor from 'stimulus-conductor'
// create a parent controller by extending stimulus-conductor controller
export default class extends Conductor {
connect() {
// if you overwrite connect you must call super!!!!
super.connect()
}
disconnect() {
// if you overwrite disconnect you must call super!!!!
super.disconnect()
}
update() {
// this.itemControllers is an array of item stimulus controllers
// this.itemControllers.length -> 3
}
}
By convention the parent controller has a new class method
this.itemControllersthat return an array of all children controllers
stimulus-conductor// ./controllers/item_controller.js
import Conductor from 'stimulus-conductor'
// create a kid controller by extending stimulus-conductor controller
export default class extends Conductor {
connect() {
// if you overwrite connect you must call super!!!!
super.connect()
// you can access to the parent controller like this
// this.itemsController is the stimulus controller for the parent controller
}
}
By convention all children controllers have a new class method
this.itemsControllerthat return the parent controller
Sometime plurals are not just as simple as adding a s at the end. You can overide the musician and conductor name by setting the static musicianId and conductorId values.
// your conductor todo_controller.js
export default class extends Controller {
static musicianId = 'todo-item'
// ...
}
// your musicians todo-item_controller.js
export default class extends Controller {
static conductorId = 'todo'
// ...
}
An very basic todo list example is available on Glitch :
Currently the library makes a very simple plural of the controller name by adding a sat the end of the word:
todo is conducted by todositem is conducted by itemsmore complex plurals (child/children) are not yet supported
Currently it only works with nested parent/children elements
Bug reports and pull requests are welcome.
To contribute:
Fork the project.
Install dependencies
$ yarn install
Start the test watcher
$ yarn test:watch
Running one-off test runs can be done with:
$ yarn test
You can test locally also the results with the playground project (yarn start)
Then :
👍 Write some tests
💪 Add your feature
🚀 Send a PR
This package is available as open source under the terms of the MIT License.
FAQs
An optionated Stimulus Controller to easily manage parent/children controllers
The npm package stimulus-conductor receives a total of 35 weekly downloads. As such, stimulus-conductor popularity was classified as not popular.
We found that stimulus-conductor 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.

Research
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.