
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
data-factory
Advanced tools
Manage data and stack easily with data-factory
npm install --save data-factory
Create as much data that you need and manage them in one instance.
const dataFactory = require('data-factory');
var data = new dataFactory;
data.set('Wait why ? I have not key ?') // set data to local data
data.push('coucou'); // set data to local stack
data.push('my');
data.push('Bread');
data.set('toto', 'tutu'); // set 'toto' key and 'tutu' value
data.set('tutu', ['toto']);
data.tutu.push('test'); // get tutu instance created before and push to local stack in tutu instance
data.set('parent', 'I am THE parent');
data.parent.set('child', 'Am I the child ?');
data.parent.concat(['pop me', 'and me too']);
data.parent.pop(1); // remove element from stack
data.parent.pop();
data.set('removeMe', 'data')
data.unset('removeMe'); // remove instance + data
console.log(data.get()); // get local data
console.log(data.get('tutu')); // get tutu data (data.tutu to get tutu instance)
console.log(data.tutu.getStack());
console.log(data.get('parent'));
console.log(data.parent.get('child'));
console.log(data.parent.getStack());
console.log(data.get('removeMe'));
console.log(data.getStack()); // get stack list
console.log(data.getAll()); // get all data from instance
Name | Description | Additionnal |
---|---|---|
set(key: string , data: any ) : current | Add data in key from current instance and create key instance | |
unset(key: string ) : current | Remove data in key from current instance and remove key instance | |
push(data: any ) : current | Push data in stack from current instance | |
concat(data: any ) : current | Concat data with local stack from current instance | |
pop(key: number ) : current | Remove element from stack | |
get(key: string ) : current | Get specific data from current instance | |
getStack() : current | Get all local stack from current instance | |
getAll() : current | Get all local data from current instance |
FAQs
Manage data and stack easily with data-factory.
We found that data-factory 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
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.