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

byte-jscript

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

byte-jscript

A helper package for creating Macros and Validation Rules within the Byte Pro Loan Management System (LMS).

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Byte Pro Helper Library

npm install byte-jscript

Usage Instructions

Usage Disclaimer

This library is not functional in any way, shape, or form. This should not be used in any running Javascript project, as the types and function definitions are purely for assisting development teams create Macros and Validation Rules for the Byte Pro system.

Environment Requirements

  • Node (LTS Version Recommended)
  • VSCode

Environment Setup

  • Create a new folder and name it anything you want
  • Open VSCode and navigate to your newly created folder
  • Open the terminal within VSCode
    • Type the following commands (in order)
      • npm init -y
      • npm install byte-jscript
  • Create a new file named index.js
  • Import the library at the top
    • Non-module
      • const { ev, los } = require("byte-jscript")
    • Module
      • import { ev, los } from "byte-jscript"
  • Start writing your macro / validation rule below the import statement
    • All code below the import statement can be copy/paste into the Byte software

Examples

// Import
const { ev, los } = require("byte-jscript");

// Macro
if (los.GetField("FileData.FileName") == "123456") {

    for (var i = 1; i <= ev.File.GetCollectionCount("Condition"); i++) {
        var obj = ev.File.GetCollectionObject("Condition", i);
        var desc = obj.GetField("_Description");

        if (desc == "Example Desc") {
            los.Application.ShowMessageBox("Description Found:" + desc);

            obj.SetField("_Description", "Not an example I promise");
        }
    }
}

// Validation Rule
if (ev.ButtonID == "exampleButton1") {
    ev.Cancel = true;
}

Keywords

Byte

FAQs

Package last updated on 02 Mar 2023

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