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

@azothjs/channels

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azothjs/channels - npm Package Compare versions

Comparing version 0.3.6 to 0.3.7

2

package.json
{
"name": "@azothjs/channels",
"version": "0.3.6",
"version": "0.3.7",
"description": "Asynchronous layout channels",

@@ -5,0 +5,0 @@ "author": "Marty Nelson",

@@ -5,9 +5,10 @@ import { Sync } from '../maya/compose/compose.js';

export function reduce(reducer, init) {
export function reduce(reducer, init, initialAction = null) {
if(reducer && typeof reducer !== 'function') {
throw new TransformNotFunctionArgumentError(reducer, { method: 'reduce', param: 'reducer' });
}
let state = reducer(init);
let state = reducer(init, initialAction);
const [iter, dispatch] = generator(action => state = reducer(state, action));
return [Sync.wrap(state, iter), dispatch];
}
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