Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Node.js Tcl bindings to execute Tcl commands using a native Tcl Interpreter.
sudo apt-get install tcl-dev
or sudo yum install tcl-devel
)The build process will look for tclConfig.sh
to identify Tcl include directory
and linker flags. If you are using a Tcl version older than 8.5 or want to link to a specific
Tcl installation use the TCLCONFIG
environment variable to override the default behaviour
(e.g. export TCLCONFIG=/path/to/tclConfig.sh
).
$ npm install --save tcl
var tcl = require( 'tcl' );
var Tcl = require( 'tcl' ).Tcl;
var tcl = new Tcl();
Execute a Tcl command synchronously and returns a Result.
Name | Type | Description |
---|---|---|
cmd | String | Command to execute |
tcl.$( 'info version' );
Execute a Tcl command using injected helper methods and returns a Result.
tcl.$.info( 'tclversion' );
tcl.$.set( 'x', 10 );
tcl.$.expr( 22, '/', '7.0' );
Load a Tcl module and refresh injected helper methods.
tcl.load( 'libfoo.so' );
tcl.$.foo();
Source a Tcl script file and refresh injected helper methods.
tcl.source( '/path/to/multiply.tcl' );
tcl.$.multiply( 2, 3 );
Execute a Tcl command asynchronously using a new worker thread (A new Tcl interpreter instance will be created for each call).
Name | Type | Description |
---|---|---|
cmd | String | Command to execute |
callback | Callback | Callback method to handle the response |
tcl.cmd( 'info tclversion', function ( err, result ) {
if ( err ) {
return console.log( err );
}
console.log( result.data() );
} );
tcl.eval( 'info commands', function ( err, result ) {
if ( err ) {
return console.log( err );
}
console.log( result.toArray() );
} );
Execute a Tcl command asynchronously using a shared worker thread. A new Tcl interpreter instance will be created for the worker thread but will be shared between calls.
Name | Type | Description |
---|---|---|
cmd | String | Command to execute |
callback | Callback | Callback method to handle the response |
tcl.queue( 'set x 1' );
tcl.queue( 'incr x', function ( err, result ) {
if ( err ) {
return console.log( err );
}
console.log( result.data() ); // 2
} );
JSDoc generated API documentation can be found at http://nukedzn.github.io/node-tcl/docs/.
Contributions are welcome through GitHub pull requests (using fork & pull model).
FAQs
Node.js Tcl binding
The npm package tcl receives a total of 3 weekly downloads. As such, tcl popularity was classified as not popular.
We found that tcl demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.