
Research
/Security News
Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.
chainscript
Advanced tools
var Chainscript = require('chainscript-client');
// You pass the initial script
new Chainscript({document: {content: {name: 'My Document'}}})
// Add a snapshot command
.snapshot()
// Add a notarize command
.notarize()
// Add a send mail command
.email('stephan.florquin+test@gmail.com')
// Run the script (returns a promise)
.run()
.then(function(script) {
console.log(script.toJSON());
})
.fail(function(err) {
console.error(err.message);
});
var Chainscript = require('chainscript-client');
Chainscript.load('3940c155-d17d-421a-b34e-8bf5a458299e')
.then(function(script) {
console.log(script.toJSON());
// You can add commands to the loaded script and run the script
return script
.email('stephan.florquin+test@gmail.com')
.run();
}).then(function(script) {
// New script executed with added commands
console.log(script.toJSON());
})
.fail(function(err) {
console.error(err.message);
});
Chainscript IS IMMUTABLE. An instance is never modified after
initialization. Adding commands to a script returns a new instance.
Creates a new Chainscript from a JSON object.
Loads an existing script. Returns a promise that resolves with an instance of
Chainscript.
Returns the value at specified path, or undefined if the path doesn't exist.
Ex:
var value = new Chainscript({document: {content: {name: 'My Document'}}})
get('document.content.name'));
console.log(value); // My Document
Adds a snapshot command to a script. Returns a new instance of Chainscript.
Adds an update command to a script. Returns a new instance of Chainscript.
Adds a notarize command to a script. Returns a new instance of Chainscript.
Adds a send_email command to a script. Returns a new instance of
Chainscript.
Adds an update command to a script that applies granular updates to the
document. Returns a new instance of Chainscript.
Ex:
new Chainscript({document: {content: {name: 'My Document'}}})
.change(function(get, set, remove) {
set('name', get('name') + ' V2');
set('meta.author', 'Stephan Florquin');
set('meta.time', Date.now());
})
.run()
.then(function(script) {
console.log(script.get('document.content'));
})
.fail(function(err) {
console.error(err.message);
});
Returns the script as a JSON object.
Runs the Chainscript. Returns a promise that resolves with a new instance of
Chainscript.
Clones Chainscript. Returns a new instance of Chainscript.
FAQs
Client for chainscript.io
The npm package chainscript receives a total of 59 weekly downloads. As such, chainscript popularity was classified as not popular.
We found that chainscript 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
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.