
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
A simple object management system.
Mu-Manager is an object management system. It can also act as an object factory as well when configured.
In it's simplist use, Mu-Manager acts as a way to easily manage and call on objects, though it can handle other datatypes as well.
const Manager = require('mu-manager');
const tasks = new Manager();
// register a new 'task'
tasks.register('first-task', {
name: 'foobar',
description: 'Do some console logging.',
func: () => console.log('This is a task!')
});
// Later, we want to reference the task in our code and run our function.
console.log(tasks.get('first-task').name) // 'foobar'
tasks.get('first-task').func() // Logged to console: 'This is a task!'
Say we have a pre-established class for a task. Instead of feeding the manager an object literal, it can create a new instance of a class. When defining a new instance of mu-manager, pass in a create method, which is a function that accepts an array of arguments.
const Manager = require('mu-manager');
// First we're going to create a simple class to work with.
/** Create a new Task */
class Task {
constructor({name, description, func}){
this.name = name;
this.description = description;
this.func = func;
}
/** Logs to the console */
doSomething() {
console.log('Did something!');
}
}
// Next we create a new instanc of the mu-manager, defining the create
// method, using our `task` class.
tasks = new Manager({
// The create method is passed an array of arguments. I'm using
// destructuring here to grab the first.
create: [options={}] => new Task(options)
})
// Create our new object This creates and stores a new 'todo' object under
// the task list.
tasks.create('first-task', {
name: 'foobar',
description: 'Do some console logging.',
func: () => console.log('This is a task!')
});
// Later, we want to reference the task in our code and run our function.
console.log(tasks.get('first-task').name) // 'foobar'
tasks.get('first-task').func() // Logged to console: 'This is a task!'
// But we can also call methods attached to the object.
tasks.get('first-task').doSomething() // Logged to console: 'Did Something!'
FAQs
A simple object tagged object management system.
The npm package mu-manager receives a total of 7 weekly downloads. As such, mu-manager popularity was classified as not popular.
We found that mu-manager 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.