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

umd

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

umd - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

HISTORY.md

32

index.js

@@ -0,5 +1,8 @@

'use strict';
var through = require('through');
var rfile = require('rfile');
var uglify = require('uglify-js');
var templateSTR = rfile('./template.js');
var uglify = require('uglify-js');
function template(moduleName, cjs) {

@@ -28,17 +31,16 @@ var str = uglify.minify(

return exports.prelude(name, cjs) + src + exports.postlude(name, cjs);
} else {
var strm = through(write, end);
var first = true;
function write(chunk) {
if (first) strm.queue(exports.prelude(name, cjs));
first = false;
strm.queue(chunk);
}
function end() {
if (first) strm.queue(exports.prelude(name, cjs));
strm.queue(exports.postlude(name, cjs));
strm.queue(null);
}
return strm;
}
var strm = through(write, end);
var first = true;
function write(chunk) {
if (first) strm.queue(exports.prelude(name, cjs));
first = false;
strm.queue(chunk);
}
function end() {
if (first) strm.queue(exports.prelude(name, cjs));
strm.queue(exports.postlude(name, cjs));
strm.queue(null);
}
return strm;
};

@@ -45,0 +47,0 @@

{
"name": "umd",
"version": "2.0.0",
"version": "2.1.0",
"description": "Universal Module Definition for use in automated build systems",

@@ -5,0 +5,0 @@ "bin": "./bin/cli.js",

;(function (f) {
// CommonJS
if (typeof exports === "object") {
if (typeof exports === "object" && typeof module !== "undefined") {
module.exports = f();

@@ -8,3 +8,3 @@

} else if (typeof define === "function" && define.amd) {
define(f);
define([], f);

@@ -11,0 +11,0 @@ // <script>

@@ -0,1 +1,3 @@

'use strict';
var assert = require('assert')

@@ -17,3 +19,4 @@ var umd = require('../')

var defed
function define(fn) {
function define(d, fn) {
assert.deepEqual(d, [], 'You must pass an empty array of dependencies to amd to prevent dependency scanning.');
defed = fn()

@@ -20,0 +23,0 @@ }

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