npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ssjs-data

v0.2.2

Published

Canonical SSJS (Server-Side JavaScript) function catalog, Core library objects, Platform methods, and globals for SFMC tooling

Readme

ssjs-data

Canonical SSJS (Server-Side JavaScript) function catalog, Core library objects, Platform methods, and globals for Salesforce Marketing Cloud (SFMC) tooling.

This package is the single source of truth consumed by:

Installation

npm install ssjs-data

Usage

import {
    SSJS_GLOBALS,
    SSJS_GLOBALS_MAP,
    PLATFORM_METHODS,
    PLATFORM_FUNCTIONS,
    platformFunctionLookup,
    platformFunctionNames,
    CORE_LIBRARY_OBJECTS,
    coreObjectNames,
    coreObjectLookup,
    HTTP_METHODS,
    httpMethodNames,
    WSPROXY_METHODS,
    wsproxyMethodNames,
    SCRIPT_UTIL_CONSTRUCTORS,
    SCRIPT_UTIL_REQUEST_METHODS,
    ECMASCRIPT_BUILTINS,
    UNSUPPORTED_SYNTAX,
    unsupportedByNodeType,
    POLYFILLABLE_METHODS,
    polyfillByPrototypeName,
    polyfillByStaticName,
} from 'ssjs-data';

SSJS_GLOBALS / SSJS_GLOBALS_MAP

Global functions and objects available at the top scope of any SSJS execution context (no Platform.Load required):

import { SSJS_GLOBALS, SSJS_GLOBALS_MAP } from 'ssjs-data';

for (const global of SSJS_GLOBALS) {
    console.log(global.name);        // e.g. 'Write', 'Stringify'
    console.log(global.type);        // 'function' | 'object'
    console.log(global.description);
}

// SSJS_GLOBALS_MAP is shaped for ESLint's globals config:
// { Write: 'readonly', Platform: 'readonly', ... }
console.log(SSJS_GLOBALS_MAP['Write']); // 'readonly'

PLATFORM_METHODS

Top-level Platform.* methods (e.g. Platform.Load):

import { PLATFORM_METHODS } from 'ssjs-data';

for (const method of PLATFORM_METHODS) {
    console.log(method.name);     // e.g. 'Load'
    console.log(method.syntax);   // e.g. 'Platform.Load(libraryName, version)'
    console.log(method.minArgs);
    console.log(method.maxArgs);
}

PLATFORM_FUNCTIONS / platformFunctionLookup / platformFunctionNames

The Platform.Function.* catalog — available without Platform.Load:

import { PLATFORM_FUNCTIONS, platformFunctionLookup, platformFunctionNames } from 'ssjs-data';

// Full catalog
for (const fn of PLATFORM_FUNCTIONS) {
    console.log(fn.name);        // e.g. 'Lookup'
    console.log(fn.minArgs);
    console.log(fn.maxArgs);
    console.log(fn.description);
    console.log(fn.params);      // array of { name, description, type?, optional? }
    console.log(fn.returnType);
    console.log(fn.syntax);
}

// O(1) lookup by lowercase name
const entry = platformFunctionLookup.get('lookup');

// Existence check
if (platformFunctionNames.has('lookup')) { /* ... */ }

CORE_LIBRARY_OBJECTS / coreObjectNames / coreObjectLookup

Objects that require Platform.Load("core", "1") before use (e.g. DataExtension, Subscriber):

import { CORE_LIBRARY_OBJECTS, coreObjectNames, coreObjectLookup } from 'ssjs-data';

for (const obj of CORE_LIBRARY_OBJECTS) {
    console.log(obj.name);        // e.g. 'DataExtension', 'DataExtension.Rows'
    console.log(obj.methods);     // e.g. ['Init', 'Add', 'Remove', 'Update', 'Retrieve']
    console.log(obj.description);
}

// Existence check
if (coreObjectNames.has('DataExtension')) { /* ... */ }

// O(1) lookup
const de = coreObjectLookup.get('DataExtension');

HTTP_METHODS / httpMethodNames

Methods available on the HTTP platform object:

import { HTTP_METHODS, httpMethodNames } from 'ssjs-data';

for (const method of HTTP_METHODS) {
    console.log(method.name);   // e.g. 'Get', 'Post'
    console.log(method.syntax);
}

if (httpMethodNames.has('get')) { /* ... */ }

WSPROXY_METHODS / wsproxyMethodNames

SOAP API methods available on the WSProxy object:

import { WSPROXY_METHODS, wsproxyMethodNames } from 'ssjs-data';

for (const method of WSPROXY_METHODS) {
    console.log(method.name);   // e.g. 'retrieve', 'create', 'update'
    console.log(method.syntax);
}

if (wsproxyMethodNames.has('retrieve')) { /* ... */ }

SCRIPT_UTIL_CONSTRUCTORS / SCRIPT_UTIL_REQUEST_METHODS

Script.Util constructors (e.g. Script.Util.HttpRequest) and their instance methods:

import { SCRIPT_UTIL_CONSTRUCTORS, SCRIPT_UTIL_REQUEST_METHODS } from 'ssjs-data';

for (const ctor of SCRIPT_UTIL_CONSTRUCTORS) {
    console.log(ctor.name);       // e.g. 'HttpRequest'
    console.log(ctor.returnType); // e.g. 'HttpRequest'
}

for (const method of SCRIPT_UTIL_REQUEST_METHODS) {
    console.log(method.name);     // e.g. 'send', 'setHeader'
}

ECMASCRIPT_BUILTINS

ECMAScript built-in methods and properties supported by the SSJS engine:

import { ECMASCRIPT_BUILTINS } from 'ssjs-data';

for (const builtin of ECMASCRIPT_BUILTINS) {
    console.log(builtin.name);    // e.g. 'push', 'slice'
    console.log(builtin.owner);   // e.g. 'Array', 'String', 'Math'
    console.log(builtin.description);
}

UNSUPPORTED_SYNTAX / unsupportedByNodeType

JavaScript syntax constructs that the SSJS engine does not support:

import { UNSUPPORTED_SYNTAX, unsupportedByNodeType } from 'ssjs-data';

for (const item of UNSUPPORTED_SYNTAX) {
    console.log(item.nodeType);   // AST node type, e.g. 'ArrowFunctionExpression'
    console.log(item.name);       // human-readable name
    console.log(item.description);
}

// Keyed lookup by AST node type
const info = unsupportedByNodeType.get('ArrowFunctionExpression');

POLYFILLABLE_METHODS / polyfillByPrototypeName / polyfillByStaticName

Methods that are absent from the SSJS engine but can be polyfilled:

import { POLYFILLABLE_METHODS, polyfillByPrototypeName, polyfillByStaticName } from 'ssjs-data';

for (const method of POLYFILLABLE_METHODS) {
    console.log(method.name);       // e.g. 'startsWith'
    console.log(method.owner);      // e.g. 'String'
    console.log(method.description);
}

// Lookup by prototype method name (e.g. 'startsWith')
const info = polyfillByPrototypeName.get('startsWith');

// Lookup by static invocation name (e.g. 'Array.isArray')
const info2 = polyfillByStaticName.get('Array.isArray');

License

MIT