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

global-queue

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

global-queue

Generate a method that will push onto a global queue.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.5K
decreased by-18.44%
Maintainers
1
Weekly downloads
 
Created
Source

global-queue

Generate a method that will push onto a global queue, commonly used by 3rd-party Javascript tools.

Installation

$ component install segmentio/global-queue

Example

var push = require('global-queue')('_analytics');

push('key', '506g76b52f52c3f662000190');
push('identify', 'user@example.com');
push('track', 'Loaded a Page');

window._analytics;
// [
//   ['key', '506g76b52f52c3f662000190'],
//   ['identify', 'user@example.com'],
//   ['track', 'Loaded a Page']
// ]

API

generate(name, [options])

Return a function that will push onto the global queue named name, creating it if it doesn't already exist. Options:

{
  wrap: true
}

Setting wrap to false will not wrap your arguments in an array. Most services want that, but some keep them as objects or plain values.

License

MIT

Keywords

FAQs

Package last updated on 13 May 2015

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