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

@purple-dot/purple-dot-js

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@purple-dot/purple-dot-js

An ES module wrapper for the purpledot.js SDK

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
93
increased by86%
Maintainers
1
Weekly downloads
 
Created
Source

PurpleDot.js SDK ES Module

An ES module wrapper for the purpledot.js SDK.

Note: This package wraps the PurpleDot object provided by the purpledot.js library and dynamically loads the underlying script. It does not bundle the full source code.

Installation

npm install @purple-dot/purple-dot-js

Usage

loadPurpleDot

This function returns a promise that resolves with the PurpleDot object provided by the SDK. If not included already, it will inject the script tag into your page and load it. When called in a server environment it returns null.

import { loadPurpleDot } from '@purple-dot/purple-dot-js';

// Injects the script and loads the SDK
const purpleDot = await loadPurpleDot();

// Use the SDK as usual
purpleDot.init({ apiKey: '5f6b6189-5380-423d-8f59-6c34eb61bbff' });
purpleDot.load({ placementType: 'button' });

Keywords

FAQs

Package last updated on 05 Oct 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