New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tv2media/command-transpiler

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tv2media/command-transpiler - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

6

lib/transpiler.d.ts
import { Rules } from './rules';
import { ModifierDomain } from './modifier';
interface IVariables {
[key: string]: any;
}
export declare class Transpiler {
protected rules: Rules;
constructor(rules?: Rules, modifiers?: ModifierDomain);
transpile(input: string): {
transpile(input: string, variables?: IVariables): {
line: number;

@@ -11,1 +14,2 @@ result: string;

}
export {};

4

lib/transpiler.js

@@ -10,7 +10,7 @@ "use strict";

}
transpile(input) {
transpile(input, variables = {}) {
for (const [line, rule] of this.rules.entries()) {
const result = rule.match(input);
if (result !== null) {
return { line, result: rule.fill(result) };
return { line, result: rule.fill({ ...variables, ...result }) };
}

@@ -17,0 +17,0 @@ }

{
"name": "@tv2media/command-transpiler",
"version": "1.0.1",
"version": "1.0.2",
"description": "Transpiles commands from one protocol to another.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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