You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@skitscript/parser-nodejs

Package Overview
Dependencies
Maintainers
0
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@skitscript/parser-nodejs

A Skitscript document parser targeting NodeJS.


Version published
Maintainers
0
Created

Readme

Source

Skitscript Parser (NodeJS) Continuous Integration License Renovate enabled npm npm type definitions

A Skitscript document parser targeting NodeJS.

Installation

Dependencies

This is a NPM package. It targets NodeJS 20.14.0 or newer on the following operating systems:

  • Ubuntu 22.04
  • Ubuntu 20.04
  • macOS 13 (Ventura)
  • macOS 12 (Monterey)
  • macOS 11 (Big Sur)
  • Windows Server 2022
  • Windows Server 2019

It is likely also possible to use this package as part of a web browser application through tools such as webpack. This has not been tested, however.

Install as a runtime dependency

If your application uses this as a runtime dependency, install it like any other NPM package:

npm install --save @skitscript/parser-nodejs

Install as a development dependency

If this is used when building your application and not at runtime, install it as a development dependency:

npm install --save-dev @skitscript/parser-nodejs

Usage

Validating identifiers

Import the identifierIsValid function, and provide it with a string containing a possible identifier:

import { identifierIsValid } from "@skitscript/parser-nodejs";

console.log(identifierIsValid(`Example Identifier`));
console.log(identifierIsValid(`???`));
true
false

Parsing documents

Import the parse function, and provide it with a string containing your document's content:

import { parse } from "@skitscript/parser-nodejs";

const parsed = parse(documentContentString);

console.log(parsed);
{
  "type": "valid",
  "instructions": [
    ...
  ],
  "warnings": [
    ...
  ],
  "identifierInstances": [
    ...
  ]
}
{
  "type": "invalid",
  "errors": [
    ...
  ],
  "warnings": [
    ...
  ],
  "identifierInstances": [
    ...
  ]
}

Types

A comprehensive library of types representing the results of attempting to parse documents can be imported:

import { Document } from "@skitscript/parser-nodejs";
Documents
Instructions
Formatting
Conditions
Identifiers
Warnings
Errors

FAQs

Package last updated on 23 Jun 2024

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc