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

choo-log

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

choo-log - npm Package Compare versions

Comparing version 1.4.1 to 2.0.0

10

example.js

@@ -29,17 +29,17 @@ const html = require('choo/html')

reducers: {
increment: (data, state) => {
increment: (state, data) => {
assert.equal(typeof data, 'number', 'reducer:increment: data should be a number')
return { count: state.count + data }
},
nothing: (data, state) => state
nothing: (state, data) => state
},
effects: {
error: (data, state, send, done) => {
error: (state, data, send, done) => {
const err = new Error('omg, this is broken')
done(err)
},
updateState: (data, state, send, done) => {
updateState: (state, data, send, done) => {
send('increment', state.count + 1, done)
},
doNothing: (data, state, send, done) => {
doNothing: (state, data, send, done) => {
send('nothing', state.count, done)

@@ -46,0 +46,0 @@ }

@@ -37,3 +37,3 @@ const deepDiff = require('deep-diff')

// (obj, obj, str, str, fn) -> null
function onAction (data, state, name, trace, createSend) {
function onAction (state, data, name, trace, createSend) {
const split = trace.split(':')

@@ -91,3 +91,3 @@ const actionType = split[0].trim()

// (obj, obj, obj, fn) -> null
function onStateChange (data, state, prev, createSend) {
function onStateChange (state, data, prev, createSend) {
const diff = deepDiff(prev, state) || []

@@ -94,0 +94,0 @@ // warn if there is no diff

{
"name": "choo-log",
"version": "1.4.1",
"version": "2.0.0",
"description": "Development logger for choo",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,2 +0,2 @@

# choo-log [![stability][0]][1]
# choo-log [![stability][0]][1] [![choo peer dependency][13]][14]
[![npm version][2]][3] [![build status][4]][5] [![test coverage][6]][7]

@@ -64,1 +64,3 @@ [![downloads][8]][9] [![js-standard-style][10]][11]

[12]: https://github.com/yoshuawuyts/choo
[13]: https://img.shields.io/badge/built%20for%20choo-v4-ffc3e4.svg?style=flat-square
[14]: https://github.com/yoshuawuyts/choo
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