Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

vimagination.zapto.org/jslib

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vimagination.zapto.org/jslib

Go Modules
Version
v0.0.2
Version published
Created
Source

jslib

-- import "vimagination.zapto.org/jslib"

Package jslib is a javascript packer and library for javascript projects

Usage

var (
	ErrNoFiles    = errors.New("no files")
	ErrInvalidURL = errors.New("added files must be absolute URLs")
)

Errors

var (
	ErrInvalidExport = errors.New("invalid export")
)

Errors

func NoExports

func NoExports(c *config)

NoExports disables the creation of exports for any potential plugins

func OSLoad

func OSLoad(base string) func(url string) (*javascript.Module, error)

OSLoad is the default loader for Package, with the base set to CWD

func Package

func Package(opts ...Option) (*javascript.Script, error)

Package packages up multiple javascript modules into a single file, renaming bindings to simulate imports

func ParseDynamic

func ParseDynamic(c *config)

ParseDynamic turns on dynamic import/include parsing

func Plugin

func Plugin(m *javascript.Module, url string) (*javascript.Script, error)

Plugin converts a single javascript module to make use of the processed exports from package

type Option

type Option func(*config)

Option in a type that can be passed to Package to set an option

func File

func File(url string) Option

File is an Option that specifies a starting file for Package

func Loader

func Loader(l func(string) (*javascript.Module, error)) Option

Loader sets the func that will take URLs and produce a parsed module

FAQs

Package last updated on 17 Jul 2021

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