Effortless complex scripts with unlimited power. Ncx is a JavaScript library for writing complex scripts without complexity that can be used with Node.js
The argument function called before scripts and commands.
import { x, before } from'ncx-js'before(() =>console.log('Running command'))
awaitx('echo The commmand runned successfully')
ncx.use
The argument function called when scripts and commands executed
import { x, use } from'ncx-js'use((out) => {
if (out.toLowerCase() === 'the command runned successfully') {
console.log('All done with no errors')
}
// Return function handles the error// stderr is optionalreturn (err, stderr) {
console.log('All done with error: ' + err)
}
})
awaitx('echo The commmand runned successfully')
ncx.after
The argument function called after scripts and commands
executed
import { x, after } from'ncx-js'after(() =>console.log('Runned command'))
awaitx('echo The commmand runned successfully')
ncx.afterAll
The argument function called after all scripts and commands.
For example if we set beforeAll to a function the Ncx changes the globalThis.__ncx_before_all to argument function. With that x function can be use this.
The npm package ncx-js receives a total of 0 weekly downloads. As such, ncx-js popularity was classified as not popular.
We found that ncx-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 1 open source maintainer collaborating on the project.
Package last updated on 22 Jan 2024
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.
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.