New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

postman-sandbox

Package Overview
Dependencies
Maintainers
5
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postman-sandbox

Sandbox for Postman Scripts to run in NodeJS or Chrome

  • 3.5.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
378K
decreased by-27.92%
Maintainers
5
Weekly downloads
 
Created
Source

Postman Sandbox Build Status codecov

Module that unifies execution of third-party JavaScript within Node VM and Browser iFrame.

This module is part of Postman Runtime Core and is not intended for independent use.

If you are looking to execute collections, you should bee using Newman

Usage

var Sandbox = require('postman-sandbox'),
    context;

Sandbox.createContext(function (err, ctx) {
    if (err) {
        return console.error(err);
    }

    ctx.execute(`// code here`, {}, {}, function (err) {
        if (err) {
            return console.error(err);
        }
        console.log('executed')
    });
});

Sandbox Environment

The following section outlines the API available inside sandbox scripts

pm

  • pm.globals
  • pm.environment
  • pm.collectionVariables
  • pm.test
pre-request script specials
  • pm.request
test script specials
  • pm.request
  • pm.response

Events fired from Sandbox

  • pong
  • error
  • console
  • execution
  • execution.error
  • execution.error.*
  • execution.request.*
  • execution.result.*
  • execution.cookies.*

Events responded to

  • ping
  • execute
  • execution.abort.*
  • execution.response.*
  • execution.cookies.*
  • execution.console.*

Keywords

FAQs

Package last updated on 02 Mar 2020

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc