Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tcl

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tcl

Node.js Tcl binding

  • 2.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-54.55%
Maintainers
1
Weekly downloads
 
Created
Source

node-tcl

npm version Build Status Coverage Status Dependency Status devDependency Status

Node.js Tcl bindings to execute Tcl commands using a native Tcl Interpreter.

Installation

Prerequisites : You will need to have tcl-dev packages installed on your system (e.g. sudo apt-get install tcl-dev) for the Node.js native addon to link to along with a c++11 compatible compiler (e.g. g++ v4.8).

$ npm install --save tcl

Usage

You can execute any Tcl command supported by the Tcl shell (tchsh) and you can even load native Tcl modeles (load module.so), source scripts (source filename.tcl) and source Tcl libraries (package require name).

Note : Asynchronous commands (cmd and eval) are executed usng a dedicated worker thread using a new Tcl Interpreter instance and comes with the overhead of creating and destroying a Tcl Interpreter for each call. But these executions are parallel and useful for batched tasks.

var tcl = require( 'tcl' );

// synchronous commands
console.log( tcl.version() );
console.log( tcl.cmdSync( 'info tclversion' ) );
console.log( tcl.evalSync( 'info tclversion' ) );


// asynchronous commands (parallelly executed in decated threads)
tcl.cmd( 'info tclversion', function ( err, result ) {
	console.log( result.data() );
} );

tcl.eval( 'info commands', function ( err, result ) {
	console.log( result.toArray() );
} );


// queued asynchronous commands (executed in a shared thread)
tcl.queue( 'set x 0' );
tcl.queue( 'incr $x', function ( err, result ) {
	console.log( result );
} );
var Tcl = require( 'tcl' ).Tcl;
var tcl = new Tcl();

console.log( tcl.version() );

API Documentation

JSDoc generated API documentation can be found at http://nukedzn.github.io/node-tcl/docs/.

Contributing

Contributions are welcome through GitHub pull requests (using fork & pull model).

Keywords

FAQs

Package last updated on 29 Oct 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc