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

fluxury

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluxury - npm Package Compare versions

Comparing version 0.3.7 to 0.3.9

20

index.js

@@ -20,3 +20,3 @@ /* Fluxury - Copyright 2015 Peter W Moresi */

/* transform a list of actions into useful functions */
/* transform a list of actions into key-mirrored object */
createActions: function(...actions) {

@@ -40,14 +40,12 @@ return Object.freeze(actions.reduce(function(a,b) {

var dispatchToken = dispatcher.register( function(action) {
dispatcher.waitFor(waitFor);
var newState = reducer(currentState, action);
if (currentState !== newState) {
currentState = Object.freeze(newState);
emitter.emit(changedEvent);
}
});
return Object.freeze({
name: name,
dispatchToken: dispatchToken,
dispatchToken: dispatcher.register( function(action) {
dispatcher.waitFor(waitFor);
var newState = reducer(currentState, action);
if (currentState !== newState) {
currentState = Object.freeze(newState);
emitter.emit(changedEvent);
}
} ),
addListener: function(cb) {

@@ -54,0 +52,0 @@ return emitter.addListener(changedEvent, cb)

@@ -28,3 +28,3 @@ /* Fluxury - Copyright 2015 Peter W Moresi */

/* transform a list of actions into useful functions */
/* transform a list of actions into key-mirrored object */
createActions: function createActions() {

@@ -55,14 +55,12 @@ for (var _len = arguments.length, actions = Array(_len), _key = 0; _key < _len; _key++) {

var dispatchToken = dispatcher.register(function (action) {
dispatcher.waitFor(waitFor);
var newState = reducer(currentState, action);
if (currentState !== newState) {
currentState = Object.freeze(newState);
emitter.emit(changedEvent);
}
});
return Object.freeze({
name: name,
dispatchToken: dispatchToken,
dispatchToken: dispatcher.register(function (action) {
dispatcher.waitFor(waitFor);
var newState = reducer(currentState, action);
if (currentState !== newState) {
currentState = Object.freeze(newState);
emitter.emit(changedEvent);
}
}),
addListener: function addListener(cb) {

@@ -69,0 +67,0 @@ return emitter.addListener(changedEvent, cb);

{
"name": "fluxury",
"version": "0.3.7",
"version": "0.3.9",
"description": "Add luxury sugar to simplify implementing Facebook's flavor of Flux architecture.",

@@ -20,3 +20,16 @@ "main": "./lib/index.js",

"tape": "^4.2.2"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/fluxury/fluxury.git"
},
"keywords": [
"react",
"react-component",
"flux"
],
"bugs": {
"url": "https://github.com/fluxury/fluxury/issues"
},
"homepage": "https://github.com/fluxury/fluxury#readme"
}

@@ -29,3 +29,3 @@ # fluxury

Don't be afraid to read the code. It is sparse 70 lines of ES 2015 code.
Don't be afraid to read the code. It is only 69 lines!

@@ -36,3 +36,3 @@ Pull requests welcome. Enjoy!

1. dispatch( type, data )
1. dispatch( type, data ) or dispatch( action )

@@ -44,5 +44,8 @@ Submit an action into the stores. You must specify the type and, optionally, some data.

dispatch('REQUEST_SETTINGS')
// dispatch an action with a string
dispatch('REQUEST_SETTINGS') // => { type: 'LOAD_SETTINGS', data: undefined }
// or with data
dispatch('LOAD_SETTINGS', { a: 1, b: 2 })
dispatch('LOAD_SETTINGS', { a: 1, b: 2 }) // => { type: 'LOAD_SETTINGS', data: { a: 1, b: 2 } }
// or with a custom object
dispatch({ actionType: 'move', mode: 'off the rails' })
```

@@ -161,3 +164,5 @@

var {INC, DEC} = createActions('INC', 'DEC');
var PureRenderMixin = require('react-addons-pure-render-mixin');
var countStore = createStore('CountStore', 0, function(state, action) {

@@ -176,2 +181,4 @@ switch (action.type) {

mixins: [PureRenderMixin],
componentDidMount: function() {

@@ -178,0 +185,0 @@ this.token = countStore.addListener( this.handleStoreChange );

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