šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Book a DemoInstallSign in
Socket

@splitscript.js/core

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@splitscript.js/core

Core SplitScript.js library

2.3.2
Source
npm
Version published
Weekly downloads
45
60.71%
Maintainers
1
Weekly downloads
Ā 
Created
Source

Core Splitscript.js library with event emitter and a CLI

install size downloads

docs

About

Splitscript.js is the everything framework

This package has a CLI for easily creating event listeners, and has a dev mode for adding boilerplate code automatically It also has an event emitter for creating other packages, like @splitscript.js/discord

Install

$ npm i @splitscript.js/core

Dev mode

Run splitscript dev <file/folder> to add boilerplate in new listeners in the functions folder

If a file/folder is provided, splitscript will build the files in the folder, or the folder the file is in and then run that.

If its a folder, it will default to index.ts/.js depending on the type of project, or to the "main" set in ss.json

To set the out folder, set dev in ss.json

Build

You can build a project using the command splitscript build <folder>

To set the build folder, set build in ss.json

Catching Errors

You can use the handleError for catching all listeners that fail

import { handleError } from '@splitscript.js/core'
handleError((data, err) => {
	console.log('Error: ', err)
})
// You can add multiple error handlers
handleError((data, err) => {
	console.log('This also handles the same error: ', err)
})

⚠ Make sure you put handleError() before any other code so it can handle all errors

Other packages

@splitscript.js/discord

v2.3.2 | by ultraviolet

FAQs

Package last updated on 13 Dec 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