@cycle/core
Advanced tools
Comparing version 5.0.0 to 5.0.1
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Cycle = f()}})(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(require,module,exports){ | ||
(function (global){ | ||
"use strict"; | ||
var Rx = require("rx"); | ||
var Rx = (typeof window !== "undefined" ? window['Rx'] : typeof global !== "undefined" ? global['Rx'] : null); | ||
@@ -138,3 +139,4 @@ function makeRequestProxies(drivers) { | ||
},{"rx":undefined}]},{},[1])(1) | ||
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) | ||
},{}]},{},[1])(1) | ||
}); |
@@ -1,1 +0,1 @@ | ||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Cycle=f()}})(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(require,module,exports){"use strict";var Rx=require("rx");function makeRequestProxies(drivers){var requestProxies={};for(var _name in drivers){if(drivers.hasOwnProperty(_name)){requestProxies[_name]=new Rx.ReplaySubject(1)}}return requestProxies}function callDrivers(drivers,requestProxies){var responses={};for(var _name2 in drivers){if(drivers.hasOwnProperty(_name2)){responses[_name2]=drivers[_name2](requestProxies[_name2],_name2)}}return responses}function attachDisposeToRequests(requests,replicationSubscription){Object.defineProperty(requests,"dispose",{enumerable:false,value:function value(){replicationSubscription.dispose()}});return requests}function makeDisposeResponses(responses){return function dispose(){for(var _name3 in responses){if(responses.hasOwnProperty(_name3)&&typeof responses[_name3].dispose==="function"){responses[_name3].dispose()}}}}function attachDisposeToResponses(responses){Object.defineProperty(responses,"dispose",{enumerable:false,value:makeDisposeResponses(responses)});return responses}function logToConsoleError(err){var target=err.stack||err;if(console&&console.error){console.error(target)}}function replicateMany(observables,subjects){return Rx.Observable.create(function(observer){var subscription=new Rx.CompositeDisposable;setTimeout(function(){for(var _name4 in observables){if(observables.hasOwnProperty(_name4)&&subjects.hasOwnProperty(_name4)&&!subjects[_name4].isDisposed){subscription.add(observables[_name4].doOnError(logToConsoleError).subscribe(subjects[_name4].asObserver()))}}observer.onNext(subscription)},1);return function dispose(){subscription.dispose();for(var x in subjects){if(subjects.hasOwnProperty(x)){subjects[x].dispose()}}}})}function isObjectEmpty(obj){for(var key in obj){if(obj.hasOwnProperty(key)){return false}}return true}function run(main,drivers){if(typeof main!=="function"){throw new Error("First argument given to Cycle.run() must be the 'main' "+"function.")}if(typeof drivers!=="object"||drivers===null){throw new Error("Second argument given to Cycle.run() must be an object "+"with driver functions as properties.")}if(isObjectEmpty(drivers)){throw new Error("Second argument given to Cycle.run() must be an object "+"with at least one driver function declared as a property.")}var requestProxies=makeRequestProxies(drivers);var responses=callDrivers(drivers,requestProxies);var requests=main(responses);var subscription=replicateMany(requests,requestProxies).subscribe();var requestsWithDispose=attachDisposeToRequests(requests,subscription);var responsesWithDispose=attachDisposeToResponses(responses);return[requestsWithDispose,responsesWithDispose]}var Cycle={run:run};module.exports=Cycle},{rx:undefined}]},{},[1])(1)}); | ||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Cycle=f()}})(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(require,module,exports){(function(global){"use strict";var Rx=typeof window!=="undefined"?window["Rx"]:typeof global!=="undefined"?global["Rx"]:null;function makeRequestProxies(drivers){var requestProxies={};for(var _name in drivers){if(drivers.hasOwnProperty(_name)){requestProxies[_name]=new Rx.ReplaySubject(1)}}return requestProxies}function callDrivers(drivers,requestProxies){var responses={};for(var _name2 in drivers){if(drivers.hasOwnProperty(_name2)){responses[_name2]=drivers[_name2](requestProxies[_name2],_name2)}}return responses}function attachDisposeToRequests(requests,replicationSubscription){Object.defineProperty(requests,"dispose",{enumerable:false,value:function value(){replicationSubscription.dispose()}});return requests}function makeDisposeResponses(responses){return function dispose(){for(var _name3 in responses){if(responses.hasOwnProperty(_name3)&&typeof responses[_name3].dispose==="function"){responses[_name3].dispose()}}}}function attachDisposeToResponses(responses){Object.defineProperty(responses,"dispose",{enumerable:false,value:makeDisposeResponses(responses)});return responses}function logToConsoleError(err){var target=err.stack||err;if(console&&console.error){console.error(target)}}function replicateMany(observables,subjects){return Rx.Observable.create(function(observer){var subscription=new Rx.CompositeDisposable;setTimeout(function(){for(var _name4 in observables){if(observables.hasOwnProperty(_name4)&&subjects.hasOwnProperty(_name4)&&!subjects[_name4].isDisposed){subscription.add(observables[_name4].doOnError(logToConsoleError).subscribe(subjects[_name4].asObserver()))}}observer.onNext(subscription)},1);return function dispose(){subscription.dispose();for(var x in subjects){if(subjects.hasOwnProperty(x)){subjects[x].dispose()}}}})}function isObjectEmpty(obj){for(var key in obj){if(obj.hasOwnProperty(key)){return false}}return true}function run(main,drivers){if(typeof main!=="function"){throw new Error("First argument given to Cycle.run() must be the 'main' "+"function.")}if(typeof drivers!=="object"||drivers===null){throw new Error("Second argument given to Cycle.run() must be an object "+"with driver functions as properties.")}if(isObjectEmpty(drivers)){throw new Error("Second argument given to Cycle.run() must be an object "+"with at least one driver function declared as a property.")}var requestProxies=makeRequestProxies(drivers);var responses=callDrivers(drivers,requestProxies);var requests=main(responses);var subscription=replicateMany(requests,requestProxies).subscribe();var requestsWithDispose=attachDisposeToRequests(requests,subscription);var responsesWithDispose=attachDisposeToResponses(responses);return[requestsWithDispose,responsesWithDispose]}var Cycle={run:run};module.exports=Cycle}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}]},{},[1])(1)}); |
{ | ||
"name": "@cycle/core", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"author": "Andre Staltz", | ||
@@ -27,6 +27,6 @@ "description": "A fully reactive JavaScript framework for Human-Computer Interaction", | ||
"devDependencies": { | ||
"rx": "4.0.6", | ||
"babel": "5.8.23", | ||
"babelify": "6.3.0", | ||
"browserify": "11.2.0", | ||
"browserify-shim": "^3.8.10", | ||
"eslint": "1.0.0", | ||
@@ -38,2 +38,3 @@ "eslint-config-cycle": "3.0.0", | ||
"mocha": "2.3.3", | ||
"rx": "4.0.6", | ||
"sinon": "1.17.1", | ||
@@ -46,2 +47,5 @@ "testem": "0.9.8", | ||
}, | ||
"browserify-shim": { | ||
"rx": "global:Rx" | ||
}, | ||
"scripts": { | ||
@@ -54,3 +58,3 @@ "eslint": "eslint src/", | ||
"posttest-browser": "rm test/browser/tests-bundle.js", | ||
"browserify": "browserify src/cycle.js -t babelify --standalone Cycle --exclude rx --outfile dist/cycle.js", | ||
"browserify": "browserify src/cycle.js -t babelify -t browserify-shim --standalone Cycle --exclude rx --outfile dist/cycle.js", | ||
"uglify": "uglifyjs dist/cycle.js -o dist/cycle.min.js", | ||
@@ -57,0 +61,0 @@ "dist": "npm run browserify && npm run uglify", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
33482
529
0
14