Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

closure

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

closure

Google closure-library wrapper for node.js

  • 1.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
11K
decreased by-19.85%
Maintainers
1
Weekly downloads
 
Created
Source

node-closure

Closure library wrapper for node.js.

Enjoy!

Installation

Just copy closure.js, or using npm:

npm install closure

Introduction

To use closure library with shared global object (recommended):

global.CLOSURE_BASE_PATH = 'closure-library/closure/goog/'; // default
require('closure').Closure(global);

To fetch additional closure dependencies:

goog.loadScript('my_deps.js');

That's about it.

Running separate instance of closure library

You may create isolated instance of closure library with separate global scope:

var goog = require('closure').Closure();

By default a new global object will be created, but object to be used as library global scope may be provided:

var root = {};
require('closure').Closure(root);
//root.goog is goog namespace
//root.soy is soy namespace

To just override library location:

var goog = require('closure').Closure({CLOSURE_BASE_PATH: 'closure/goog/'});

FAQs

Package last updated on 17 Mar 2013

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