New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

dirac-browser

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dirac-browser

Browser-compatible Dirac language interpreter (no Node.js dependencies)

latest
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

Dirac Browser

Browser-compatible version of the Dirac language interpreter with no Node.js dependencies.

Overview

dirac-lang-browser is a browser-safe implementation of the Dirac declarative execution language. It provides the same core functionality as dirac-lang but excludes Node.js-specific dependencies, making it suitable for client-side web applications.

Features

  • ✅ Full Dirac language support (XML-based declarative execution)
  • ✅ Subroutine composition with variable substitution
  • ✅ Parameter passing with {variable} syntax
  • ✅ Browser-compatible (no Node.js dependencies)
  • ✅ TypeScript support

Installation

npm install dirac-lang-browser

Usage

import { execute } from 'dirac-lang-browser';

const script = `
  <subroutine name="greet">
    <parameters select="@name"/>
    <eval>
      'Hello, ' + name + '!'
    </eval>
  </subroutine>
  
  <call name="greet" name="World"/>
`;

const result = await execute(script);
console.log(result); // "Hello, World!"

Recent Fixes

Variable Substitution in Nested Subroutine Calls (v0.1.0)

Fixed critical bug where variable substitution in nested <call> tags was not working correctly:

  • ✅ Added support for {var} pattern in substituteVariables()
  • ✅ Added attribute substitution in executeCallInternal() before parameter passing
  • ✅ Enables proper subroutine composition

Example that now works:

<subroutine name="set-background-color">
  <parameters select="@color"/>
  <eval>store.set('backgroundColor', color)</eval>
</subroutine>

<subroutine name="background">
  <parameters select="@color"/>
  <call name="set-background-color" color="{color}"/>
</subroutine>

<call name="background" color="red"/>

Development

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

License

MIT

  • dirac-lang - Node.js version with full features
  • dirac-angular-example - Example Angular app with LLM integration

Keywords

dirac

FAQs

Package last updated on 24 Jan 2026

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