Socket
Socket
Sign inDemoInstall

traceur

Package Overview
Dependencies
Maintainers
2
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

traceur - npm Package Compare versions

Comparing version 0.0.24 to 0.0.25

272

bin/traceur-runtime.js

@@ -38,3 +38,4 @@ (function(global) {

function typeOf(v) {
if (isSymbol(v)) return 'symbol';
if (isSymbol(v))
return 'symbol';
return typeof v;

@@ -44,3 +45,4 @@ }

var value = new SymbolValue(description);
if (!(this instanceof Symbol)) return value;
if (!(this instanceof Symbol))
return value;
throw new TypeError('Symbol cannot be new\'ed');

@@ -51,6 +53,9 @@ }

var symbolValue = this[symbolDataProperty];
if (!getOption('symbols')) return symbolValue[symbolInternalProperty];
if (!symbolValue) throw TypeError('Conversion from symbol to string');
if (!getOption('symbols'))
return symbolValue[symbolInternalProperty];
if (!symbolValue)
throw TypeError('Conversion from symbol to string');
var desc = symbolValue[symbolDescriptionProperty];
if (desc === undefined) desc = '';
if (desc === undefined)
desc = '';
return 'Symbol(' + desc + ')';

@@ -60,4 +65,6 @@ }));

var symbolValue = this[symbolDataProperty];
if (!symbolValue) throw TypeError('Conversion from symbol to string');
if (!getOption('symbols')) return symbolValue[symbolInternalProperty];
if (!symbolValue)
throw TypeError('Conversion from symbol to string');
if (!getOption('symbols'))
return symbolValue[symbolInternalProperty];
return symbolValue;

@@ -85,3 +92,4 @@ }));

function toProperty(name) {
if (isSymbol(name)) return name[symbolInternalProperty];
if (isSymbol(name))
return name[symbolInternalProperty];
return name;

@@ -94,3 +102,4 @@ }

var name = names[i];
if (!symbolValues[name]) rv.push(name);
if (!symbolValues[name])
rv.push(name);
}

@@ -107,3 +116,4 @@ return rv;

var symbol = symbolValues[names[i]];
if (symbol) rv.push(symbol);
if (symbol)
rv.push(symbol);
}

@@ -126,3 +136,4 @@ return rv;

object[name] = value;
if (sym && (desc = $getOwnPropertyDescriptor(object, name))) $defineProperty(object, name, {enumerable: false});
if (sym && (desc = $getOwnPropertyDescriptor(object, name)))
$defineProperty(object, name, {enumerable: false});
return value;

@@ -147,3 +158,4 @@ }

function is(left, right) {
if (left === right) return left !== 0 || 1 / left === 1 / right;
if (left === right)
return left !== 0 || 1 / left === 1 / right;
return left !== left && right !== right;

@@ -192,3 +204,4 @@ }

function toObject(value) {
if (value == null) throw $TypeError();
if (value == null)
throw $TypeError();
return $Object(value);

@@ -210,3 +223,4 @@ }

var result = $getOwnPropertyDescriptor(object, name);
if (result) return result;
if (result)
return result;
object = $getPrototypeOf(object);

@@ -218,3 +232,4 @@ }

var proto = $getPrototypeOf(homeObject);
if (!proto) throw $TypeError('super is null');
if (!proto)
throw $TypeError('super is null');
return getPropertyDescriptor(proto, name);

@@ -225,4 +240,6 @@ }

if (descriptor) {
if ('value'in descriptor) return descriptor.value.apply(self, args);
if (descriptor.get) return descriptor.get.call(self).apply(self, args);
if ('value' in descriptor)
return descriptor.value.apply(self, args);
if (descriptor.get)
return descriptor.get.call(self).apply(self, args);
}

@@ -234,3 +251,6 @@ throw $TypeError("super has no method '" + name + "'.");

if (descriptor) {
if (descriptor.get) return descriptor.get.call(self); else if ('value'in descriptor) return descriptor.value;
if (descriptor.get)
return descriptor.get.call(self);
else if ('value' in descriptor)
return descriptor.value;
}

@@ -265,3 +285,4 @@ return undefined;

if (arguments.length > 3) {
if (typeof superClass === 'function') ctor.__proto__ = superClass;
if (typeof superClass === 'function')
ctor.__proto__ = superClass;
ctor.prototype = $create(getProtoParent(superClass), getDescriptors(object));

@@ -280,9 +301,12 @@ } else {

var prototype = superClass.prototype;
if ($Object(prototype) === prototype || prototype === null) return superClass.prototype;
if ($Object(prototype) === prototype || prototype === null)
return superClass.prototype;
}
if (superClass === null) return null;
if (superClass === null)
return null;
throw new TypeError();
}
function defaultSuperCall(self, homeObject, args) {
if ($getPrototypeOf(homeObject) !== null) superCall(self, homeObject, 'constructor', args);
if ($getPrototypeOf(homeObject) !== null)
superCall(self, homeObject, 'constructor', args);
}

@@ -293,3 +317,3 @@ var ST_NEWBORN = 0;

var ST_CLOSED = 3;
var END_STATE = - 3;
var END_STATE = -3;
function addIterator(object) {

@@ -314,8 +338,9 @@ return defineProperty(object, Symbol.iterator, nonEnum(function() {

for (var i = this.tryStack_.length - 1; i >= 0; i--) {
if (this.tryStack_[i]. catch !== undefined) {
finallyFallThrough = this.tryStack_[i]. catch;
if (this.tryStack_[i].catch !== undefined) {
finallyFallThrough = this.tryStack_[i].catch;
break;
}
}
if (finallyFallThrough === null) finallyFallThrough = - 3;
if (finallyFallThrough === null)
finallyFallThrough = -3;
this.tryStack_.push({

@@ -327,3 +352,3 @@ finally: finallyState,

if (catchState !== null) {
this.tryStack_.push({ catch: catchState});
this.tryStack_.push({catch: catchState});
}

@@ -347,3 +372,4 @@ },

}
if (x !== undefined) throw $TypeError('Sent value to newborn generator');
if (x !== undefined)
throw $TypeError('Sent value to newborn generator');
case ST_SUSPENDED:

@@ -355,4 +381,5 @@ ctx.GState = ST_EXECUTING;

var done = value === ctx;
if (done) value = ctx.returnValue;
ctx.GState = done ? ST_CLOSED: ST_SUSPENDED;
if (done)
value = ctx.returnValue;
ctx.GState = done ? ST_CLOSED : ST_SUSPENDED;
return {

@@ -416,4 +443,5 @@ value: value,

}
ctx.state = last. catch !== undefined ? last. catch: last. finally;
if (last.finallyFallThrough !== undefined) ctx.finallyFallThrough = last.finallyFallThrough;
ctx.state = last.catch !== undefined ? last.catch : last.finally;
if (last.finallyFallThrough !== undefined)
ctx.finallyFallThrough = last.finallyFallThrough;
}

@@ -444,3 +472,3 @@ }

};
})(typeof global !== 'undefined' ? global: this);
})(typeof global !== 'undefined' ? global : this);
(function() {

@@ -488,5 +516,6 @@ function buildFromEncodedParts(opt_scheme, opt_userInfo, opt_domain, opt_port, opt_path, opt_queryData, opt_fragment) {

function removeDotSegments(path) {
if (path === '/') return '/';
var leadingSlash = path[0] === '/' ? '/': '';
var trailingSlash = path.slice(- 1) === '/' ? '/': '';
if (path === '/')
return '/';
var leadingSlash = path[0] === '/' ? '/' : '';
var trailingSlash = path.slice(-1) === '/' ? '/' : '';
var segments = path.split('/');

@@ -502,3 +531,6 @@ var out = [];

case '..':
if (out.length) out.pop(); else up++;
if (out.length)
out.pop();
else
up++;
break;

@@ -513,3 +545,4 @@ default:

}
if (out.length === 0) out.push('.');
if (out.length === 0)
out.push('.');
}

@@ -551,6 +584,9 @@ return leadingSlash + out.join('/') + trailingSlash;

function isAbsolute(name) {
if (!name) return false;
if (name[0] === '/') return true;
if (!name)
return false;
if (name[0] === '/')
return true;
var parts = split(name);
if (parts[ComponentIndex.SCHEME]) return true;
if (parts[ComponentIndex.SCHEME])
return true;
return false;

@@ -571,3 +607,6 @@ }

var baseURL;
if (global.location && global.location.href) baseURL = resolveUrl(global.location.href, './'); else baseURL = '';
if (global.location && global.location.href)
baseURL = resolveUrl(global.location.href, './');
else
baseURL = '';
var UncoatedModuleEntry = function UncoatedModuleEntry(url, uncoatedModule) {

@@ -584,7 +623,9 @@ this.url = url;

($traceurRuntime.createClass)(UncoatedModuleInstantiator, {getUncoatedModule: function() {
if (this.value_) return this.value_;
if (this.value_)
return this.value_;
return this.value_ = this.func.call(global);
}}, {}, UncoatedModuleEntry);
function getUncoatedModuleInstantiator(name) {
if (!name) return;
if (!name)
return;
var url = ModuleStore.normalize(name);

@@ -604,3 +645,4 @@ return moduleInstantiators[url];

var descr = Object.getOwnPropertyDescriptor(uncoatedModule, name);
if (descr.get) getter = descr.get;
if (descr.get)
getter = descr.get;
}

@@ -623,8 +665,11 @@ if (!getter) {

normalize: function(name, refererName, refererAddress) {
if (typeof name !== "string") throw new TypeError("module name must be a string, not " + typeof name);
if (isAbsolute(name)) return canonicalizeUrl(name);
if (typeof name !== "string")
throw new TypeError("module name must be a string, not " + typeof name);
if (isAbsolute(name))
return canonicalizeUrl(name);
if (/[^\.]\/\.\.\//.test(name)) {
throw new Error('module name embeds /../: ' + name);
}
if (name[0] === '.' && refererName) return resolveUrl(refererName, name);
if (name[0] === '.' && refererName)
return resolveUrl(refererName, name);
return canonicalizeUrl(name);

@@ -634,5 +679,7 @@ },

var m = getUncoatedModuleInstantiator(normalizedName);
if (!m) return undefined;
if (!m)
return undefined;
var moduleInstance = moduleInstances[m.url];
if (moduleInstance) return moduleInstance;
if (moduleInstance)
return moduleInstance;
moduleInstance = Module(m.getUncoatedModule(), liveModuleSentinel);

@@ -656,5 +703,17 @@ return moduleInstances[m.url] = moduleInstance;

var normalizedName = ModuleStore.normalize(name);
if (moduleInstantiators[normalizedName]) throw new Error('duplicate module named ' + normalizedName);
if (moduleInstantiators[normalizedName])
throw new Error('duplicate module named ' + normalizedName);
moduleInstantiators[normalizedName] = new UncoatedModuleInstantiator(normalizedName, func);
},
bundleStore: Object.create(null),
register: function(name, deps, func) {
if (!deps || !deps.length) {
this.registerModule(name, func);
} else {
this.bundleStore[name] = {
deps: deps,
execute: func
};
}
},
getAnonymousModule: function(func) {

@@ -684,3 +743,3 @@ return new Module(func.call(global), liveModuleSentinel);

global.System = {
registerModule: ModuleStore.registerModule,
register: ModuleStore.register.bind(ModuleStore),
get: ModuleStore.get,

@@ -694,6 +753,6 @@ set: ModuleStore.set,

};
})(typeof global !== 'undefined' ? global: this);
$traceurRuntime.ModuleStore.registerModule("traceur-runtime@0.0.24/src/runtime/polyfills/utils", function() {
})(typeof global !== 'undefined' ? global : this);
System.register("traceur-runtime@0.0.25/src/runtime/polyfills/utils", [], function() {
"use strict";
var __moduleName = "traceur-runtime@0.0.24/src/runtime/polyfills/utils";
var __moduleName = "traceur-runtime@0.0.25/src/runtime/polyfills/utils";
var toObject = $traceurRuntime.toObject;

@@ -712,7 +771,7 @@ function toUint32(x) {

});
$traceurRuntime.ModuleStore.registerModule("traceur-runtime@0.0.24/src/runtime/polyfills/ArrayIterator", function() {
System.register("traceur-runtime@0.0.25/src/runtime/polyfills/ArrayIterator", [], function() {
"use strict";
var $__4;
var __moduleName = "traceur-runtime@0.0.24/src/runtime/polyfills/ArrayIterator";
var $__5 = $traceurRuntime.getModuleImpl("traceur-runtime@0.0.24/src/runtime/polyfills/utils"),
var __moduleName = "traceur-runtime@0.0.25/src/runtime/polyfills/ArrayIterator";
var $__5 = $traceurRuntime.getModuleImpl("traceur-runtime@0.0.25/src/runtime/polyfills/utils"),
toObject = $__5.toObject,

@@ -739,4 +798,6 @@ toUint32 = $__5.toUint32;

iterator.arrayIteratorNextIndex_ = index + 1;
if (itemKind == ARRAY_ITERATOR_KIND_VALUES) return createIteratorResultObject(array[index], false);
if (itemKind == ARRAY_ITERATOR_KIND_ENTRIES) return createIteratorResultObject([index, array[index]], false);
if (itemKind == ARRAY_ITERATOR_KIND_VALUES)
return createIteratorResultObject(array[index], false);
if (itemKind == ARRAY_ITERATOR_KIND_ENTRIES)
return createIteratorResultObject([index, array[index]], false);
return createIteratorResultObject(index, false);

@@ -790,5 +851,5 @@ },

});
$traceurRuntime.ModuleStore.registerModule("traceur-runtime@0.0.24/node_modules/rsvp/lib/rsvp/asap", function() {
System.register("traceur-runtime@0.0.25/node_modules/rsvp/lib/rsvp/asap", [], function() {
"use strict";
var __moduleName = "traceur-runtime@0.0.24/node_modules/rsvp/lib/rsvp/asap";
var __moduleName = "traceur-runtime@0.0.25/node_modules/rsvp/lib/rsvp/asap";
var $__default = function asap(callback, arg) {

@@ -800,3 +861,3 @@ var length = queue.push([callback, arg]);

};
var browserGlobal = (typeof window !== 'undefined') ? window: {};
var browserGlobal = (typeof window !== 'undefined') ? window : {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;

@@ -844,6 +905,6 @@ function useNextTick() {

});
$traceurRuntime.ModuleStore.registerModule("traceur-runtime@0.0.24/src/runtime/polyfills/Promise", function() {
System.register("traceur-runtime@0.0.25/src/runtime/polyfills/Promise", [], function() {
"use strict";
var __moduleName = "traceur-runtime@0.0.24/src/runtime/polyfills/Promise";
var async = $traceurRuntime.getModuleImpl("traceur-runtime@0.0.24/node_modules/rsvp/lib/rsvp/asap").default;
var __moduleName = "traceur-runtime@0.0.25/src/runtime/polyfills/Promise";
var async = $traceurRuntime.getModuleImpl("traceur-runtime@0.0.25/node_modules/rsvp/lib/rsvp/asap").default;
function isPromise(x) {

@@ -853,6 +914,6 @@ return x && typeof x === 'object' && x.status_ !== undefined;

function chain(promise) {
var onResolve = arguments[1] !== (void 0) ? arguments[1]: (function(x) {
var onResolve = arguments[1] !== (void 0) ? arguments[1] : (function(x) {
return x;
});
var onReject = arguments[2] !== (void 0) ? arguments[2]: (function(e) {
var onReject = arguments[2] !== (void 0) ? arguments[2] : (function(e) {
throw e;

@@ -901,3 +962,3 @@ });

then: function() {
var onResolve = arguments[0] !== (void 0) ? arguments[0]: (function(x) {
var onResolve = arguments[0] !== (void 0) ? arguments[0] : (function(x) {
return x;

@@ -910,3 +971,3 @@ });

x = promiseCoerce(constructor, x);
return x === $__6 ? onReject(new TypeError): isPromise(x) ? x.then(onResolve, onReject): onResolve(x);
return x === $__6 ? onReject(new TypeError) : isPromise(x) ? x.then(onResolve, onReject) : onResolve(x);
}), onReject);

@@ -926,3 +987,4 @@ }

cast: function(x) {
if (x instanceof this) return x;
if (x instanceof this)
return x;
if (isPromise(x)) {

@@ -944,9 +1006,12 @@ var result = getDeferred(this);

resolutions[i] = x;
if (--count === 0) deferred.resolve(resolutions);
if (--count === 0)
deferred.resolve(resolutions);
}.bind(undefined, i), (function(r) {
if (count > 0) count = 0;
if (count > 0)
count = 0;
deferred.reject(r);
}));
}
if (count === 0) deferred.resolve(resolutions);
if (count === 0)
deferred.resolve(resolutions);
} catch (e) {

@@ -980,3 +1045,4 @@ deferred.reject(e);

function promiseDone(promise, status, value, reactions) {
if (promise.status_ !== 'pending') return;
if (promise.status_ !== 'pending')
return;
for (var i = 0; i < reactions.length; i++) {

@@ -993,3 +1059,8 @@ promiseReact(reactions[i][0], reactions[i][1], value);

var y = handler(x);
if (y === deferred.promise) throw new TypeError; else if (isPromise(y)) chain(y, deferred.resolve, deferred.reject); else deferred.resolve(y);
if (y === deferred.promise)
throw new TypeError;
else if (isPromise(y))
chain(y, deferred.resolve, deferred.reject);
else
deferred.resolve(y);
} catch (e) {

@@ -1026,5 +1097,5 @@ deferred.reject(e);

});
$traceurRuntime.ModuleStore.registerModule("traceur-runtime@0.0.24/src/runtime/polyfills/String", function() {
System.register("traceur-runtime@0.0.25/src/runtime/polyfills/String", [], function() {
"use strict";
var __moduleName = "traceur-runtime@0.0.24/src/runtime/polyfills/String";
var __moduleName = "traceur-runtime@0.0.25/src/runtime/polyfills/String";
var $toString = Object.prototype.toString;

@@ -1041,4 +1112,4 @@ var $indexOf = String.prototype.indexOf;

var searchLength = searchString.length;
var position = arguments.length > 1 ? arguments[1]: undefined;
var pos = position ? Number(position): 0;
var position = arguments.length > 1 ? arguments[1] : undefined;
var pos = position ? Number(position) : 0;
if (isNaN(pos)) {

@@ -1062,3 +1133,3 @@ pos = 0;

if (position !== undefined) {
pos = position ? Number(position): 0;
pos = position ? Number(position) : 0;
if (isNaN(pos)) {

@@ -1084,4 +1155,4 @@ pos = 0;

var searchLength = searchString.length;
var position = arguments.length > 1 ? arguments[1]: undefined;
var pos = position ? Number(position): 0;
var position = arguments.length > 1 ? arguments[1] : undefined;
var pos = position ? Number(position) : 0;
if (isNaN(pos)) {

@@ -1091,3 +1162,3 @@ pos = 0;

var start = Math.min(Math.max(pos, 0), stringLength);
return $indexOf.call(string, searchString, pos) != - 1;
return $indexOf.call(string, searchString, pos) != -1;
}

@@ -1099,3 +1170,3 @@ function repeat(count) {

var string = String(this);
var n = count ? Number(count): 0;
var n = count ? Number(count) : 0;
if (isNaN(n)) {

@@ -1122,3 +1193,3 @@ n = 0;

var size = string.length;
var index = position ? Number(position): 0;
var index = position ? Number(position) : 0;
if (isNaN(index)) {

@@ -1143,3 +1214,4 @@ index = 0;

var len = raw.length >>> 0;
if (len === 0) return '';
if (len === 0)
return '';
var s = '';

@@ -1149,3 +1221,4 @@ var i = 0;

s += raw[i];
if (i + 1 === len) return s;
if (i + 1 === len)
return s;
s += arguments[++i];

@@ -1159,3 +1232,3 @@ }

var lowSurrogate;
var index = - 1;
var index = -1;
var length = arguments.length;

@@ -1205,7 +1278,7 @@ if (!length) {

});
$traceurRuntime.ModuleStore.registerModule("traceur-runtime@0.0.24/src/runtime/polyfills/polyfills", function() {
System.register("traceur-runtime@0.0.25/src/runtime/polyfills/polyfills", [], function() {
"use strict";
var __moduleName = "traceur-runtime@0.0.24/src/runtime/polyfills/polyfills";
var Promise = $traceurRuntime.getModuleImpl("traceur-runtime@0.0.24/src/runtime/polyfills/Promise").Promise;
var $__9 = $traceurRuntime.getModuleImpl("traceur-runtime@0.0.24/src/runtime/polyfills/String"),
var __moduleName = "traceur-runtime@0.0.25/src/runtime/polyfills/polyfills";
var Promise = $traceurRuntime.getModuleImpl("traceur-runtime@0.0.25/src/runtime/polyfills/Promise").Promise;
var $__9 = $traceurRuntime.getModuleImpl("traceur-runtime@0.0.25/src/runtime/polyfills/String"),
codePointAt = $__9.codePointAt,

@@ -1218,3 +1291,3 @@ contains = $__9.contains,

startsWith = $__9.startsWith;
var $__9 = $traceurRuntime.getModuleImpl("traceur-runtime@0.0.24/src/runtime/polyfills/ArrayIterator"),
var $__9 = $traceurRuntime.getModuleImpl("traceur-runtime@0.0.25/src/runtime/polyfills/ArrayIterator"),
entries = $__9.entries,

@@ -1241,3 +1314,4 @@ keys = $__9.keys,

function polyfillPromise(global) {
if (!global.Promise) global.Promise = Promise;
if (!global.Promise)
global.Promise = Promise;
}

@@ -1272,8 +1346,8 @@ function polyfillString(String) {

});
$traceurRuntime.ModuleStore.registerModule("traceur-runtime@0.0.24/src/runtime/polyfill-import", function() {
System.register("traceur-runtime@0.0.25/src/runtime/polyfill-import", [], function() {
"use strict";
var __moduleName = "traceur-runtime@0.0.24/src/runtime/polyfill-import";
var $__11 = $traceurRuntime.getModuleImpl("traceur-runtime@0.0.24/src/runtime/polyfills/polyfills");
var __moduleName = "traceur-runtime@0.0.25/src/runtime/polyfill-import";
var $__11 = $traceurRuntime.getModuleImpl("traceur-runtime@0.0.25/src/runtime/polyfills/polyfills");
return {};
});
System.get("traceur-runtime@0.0.24/src/runtime/polyfill-import" + '');
System.get("traceur-runtime@0.0.25/src/runtime/polyfill-import" + '');
{
"name": "traceur",
"version": "0.0.24",
"version": "0.0.25",
"description": "Experimental ES6 to ES5 compiler",

@@ -48,5 +48,5 @@ "keywords": [

"semver": "2.2.1",
"traceur": "0.0.23"
"traceur": "0.0.24"
},
"subdomain": "traceur"
}

@@ -117,8 +117,12 @@ // Copyright 2012 Traceur Authors.

var loadAsScript = scriptsCount && (loadCount < scriptsCount);
var doEvaluateModule = false;
var loadFunction = loader.import;
var name = filenames[loadCount];
if (loadAsScript)
if (loadAsScript) {
loadFunction = loader.loadAsScript;
else
} else {
name = name.replace(/\.js$/,'');
if (options.modules !== 'inline' && options.modules !== 'instantiate')
doEvaluateModule = true;
}

@@ -128,3 +132,3 @@ var loadOptions = {referrerName: referrerName};

function() {
if (!loadAsScript && options.modules !== 'inline')
if (doEvaluateModule)
appendEvaluateModule(name, referrerName);

@@ -131,0 +135,0 @@ loadCount++;

Sorry, the diff of this file is too big to display

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