Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Simply, it's a library based on the CQS-Princip, where your methods are separated by commands and queries.
What BothIO makes so special is the NodeJS/Client-Support, so you can execute your commands and queries from your node-side as well as from your client-side.
var myToDoList = [];
// # Define a Command
// Server:
both.command('CreateTodo', function(name, payload, callback){
myToDoList.push(payload.todoName);
});
// Execute a Command
// Client:
both('CreateTodo', {
todoName: 'eat some chocolate'
});
// Listen to a defined Command
// Server:
both.on('CreateTodo', function(name, payload){
console.log('Todo Created:', payload.todoName);
});
// Listen to all Commands
// Client:
both.on(function(commandName, payload){
console.log('The command', commandName, 'was executed!');
console.log('with the payload:', payload);
});
// # Add a Callback
// Server:
both.query('GetAllTodos', function(name, payload, callback){
someDatabase.query('getAllTodos', function(todos){
callback(todos);
});
});
// Client:
both('GetAllTodos', {}, function(todos){
// Use Todos at the client
})
And there's something more planed
This project is used at the entertain.io platform.
BothIO uses the new ES6 standard and is tested with mocha, plus we package the code with webpack.
You want contribute? Here is how you start:
Clone repo
git clone git@github.com:michaelzoidl/both.io.git
Run the unit-tests
npm run test
Pack the code and save it in the dist-folder
npm run pack
Develop, it starts a mocha-watcher
npm run develop
FAQs
both
We found that both.io 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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.