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

alt

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alt - npm Package Compare versions

Comparing version

to
0.9.0

56

dist/alt.js

@@ -10,3 +10,3 @@ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Alt=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){

var Symbol = _dereq_("./polyfills/es6-symbol");
Object.assign = Object.assign || _dereq_("object-assign");
var assign = _dereq_("object-assign");

@@ -88,3 +88,3 @@ var now = Date.now();

// Copy over state so it's RO.
return Object.assign({}, this[STATE_CONTAINER]);
return assign({}, this[STATE_CONTAINER]);
};

@@ -175,3 +175,3 @@

Object.keys(obj).forEach(function (key) {
Object.assign(instance.stores[key][STATE_CONTAINER], obj[key]);
assign(instance.stores[key][STATE_CONTAINER], obj[key]);
if (instance.stores[key][STORE_BOOTSTRAP]) {

@@ -219,3 +219,3 @@ instance.stores[key][STORE_BOOTSTRAP]();

Store.prototype[LISTENERS] = {};
Object.assign(Store.prototype, StoreMixin, {
assign(Store.prototype, StoreMixin, {
_storeName: key,

@@ -234,3 +234,3 @@ dispatcher: this.dispatcher,

this.stores[key] = Object.assign(new AltStore(this.dispatcher, store), getInternalMethods(StoreModel, builtIns));
this.stores[key] = assign(new AltStore(this.dispatcher, store), getInternalMethods(StoreModel, builtIns));

@@ -245,3 +245,3 @@ saveInitialSnapshot(this, key);

var key = ActionsClass.displayName || ActionsClass.name;
var actions = Object.assign({}, getInternalMethods(ActionsClass.prototype, builtInProto));
var actions = assign({}, getInternalMethods(ActionsClass.prototype, builtInProto));

@@ -306,5 +306,7 @@ ActionsClass.call({

bootstrap(this, data);
this.bootstrap = function () {
throw new ReferenceError("Stores have already been bootstrapped");
};
if (typeof window !== "undefined") {
this.bootstrap = function () {
throw new ReferenceError("Stores have already been bootstrapped");
};
}
};

@@ -902,2 +904,6 @@

if (typeof Symbol === "function") {
return module.exports = Symbol;
}
var created = Object.create(null);

@@ -923,8 +929,8 @@ var generateName = function (desc) {

var Symbol = function (description) {
if (this instanceof Symbol) {
var SymbolPolyfill = function (description) {
if (this instanceof SymbolPolyfill) {
throw new TypeError("TypeError: Symbol is not a constructor");
}
var symbol = Object.create(Symbol.prototype);
var symbol = Object.create(SymbolPolyfill.prototype);

@@ -939,14 +945,14 @@ description = (description === undefined ? "" : String(description));

Object.defineProperties(Symbol, {
create: def(Symbol("create")),
hasInstance: def(Symbol("hasInstance")),
isConcatSpreadable: def(Symbol("isConcatSpreadable")),
isRegExp: def(Symbol("isRegExp")),
iterator: def(Symbol("iterator")),
toPrimitive: def(Symbol("toPrimitive")),
toStringTag: def(Symbol("toStringTag")),
unscopables: def(Symbol("unscopables"))
Object.defineProperties(SymbolPolyfill, {
create: def(SymbolPolyfill("create")),
hasInstance: def(SymbolPolyfill("hasInstance")),
isConcatSpreadable: def(SymbolPolyfill("isConcatSpreadable")),
isRegExp: def(SymbolPolyfill("isRegExp")),
iterator: def(SymbolPolyfill("iterator")),
toPrimitive: def(SymbolPolyfill("toPrimitive")),
toStringTag: def(SymbolPolyfill("toStringTag")),
unscopables: def(SymbolPolyfill("unscopables"))
});
Object.defineProperties(Symbol.prototype, {
Object.defineProperties(SymbolPolyfill.prototype, {
properToString: def(function () {

@@ -960,7 +966,7 @@ return "Symbol (" + this.__description__ + ")";

Object.defineProperty(Symbol.prototype, Symbol.toPrimitive, def(function (hint) {
Object.defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, def(function (hint) {
throw new TypeError("Conversion of symbol objects is not allowed");
}));
Object.defineProperty(Symbol.prototype, Symbol.toStringTag, {
Object.defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, {
value: "Symbol",

@@ -972,3 +978,3 @@ configurable: true,

module.exports = Symbol;
module.exports = SymbolPolyfill;
}());

@@ -975,0 +981,0 @@

{
"name": "alt",
"version": "0.8.0",
"version": "0.9.0",
"description": "A flux implementation",

@@ -5,0 +5,0 @@ "main": "dist/alt.js",

@@ -201,5 +201,5 @@ var Alt = require('./src/coverage-alt')

assert.equal(typeof myActions.UPDATE_NAME, 'object', 'a constant is created for each action')
assert.equal(typeof myActions.UPDATE_TWO, 'object', 'a constant is created for each action')
assert.equal(typeof myActions.CALL_INTERNAL_METHOD, 'object', 'a constant is created for each action')
assert.notEqual(typeof myActions.UPDATE_NAME, 'undefined', 'a constant is created for each action')
assert.notEqual(typeof myActions.UPDATE_TWO, 'undefined', 'a constant is created for each action')
assert.notEqual(typeof myActions.CALL_INTERNAL_METHOD, 'undefined', 'a constant is created for each action')

@@ -263,3 +263,10 @@ assert.equal(typeof myActions.updateName.defer, 'function', 'actions have a defer method for async flow')

alt.bootstrap('{"MyStore":{"name":"bee"}}')
assert.equal(myStore.getState().name, 'bee', 'on server I can bootstrap many times')
try {
// simulate the browser
global.window = {};
alt.bootstrap('{}')
// Attempting to bootstrap more than once

@@ -266,0 +273,0 @@ alt.bootstrap('{"MyStore":{"name":"bee"}}')