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

@logux/client

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@logux/client - npm Package Compare versions

Comparing version 0.14.7 to 0.15.0

11

client/index.d.ts

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

import { AbstractActionCreator } from '@logux/actions'
import { Unsubscribe } from 'nanoevents'

@@ -259,2 +260,12 @@ import {

/**
* @param actionCreator Action creator function.
* @param callbacks Callbacks for action created by creator.
*/
type<Creator extends AbstractActionCreator>(
actionCreator: Creator,
listener: ClientActionListener<ReturnType<Creator>>,
opts?: { id?: string; event?: 'preadd' | 'add' | 'clean' }
): Unsubscribe
/**
* Subscribe for synchronization events. It implements Nano Events API.

@@ -261,0 +272,0 @@ * Supported events:

1

client/index.js

@@ -306,2 +306,3 @@ import { createNanoEvents } from 'nanoevents'

type(type, listener, opts) {
if (typeof type === 'function') type = type.type
return this.log.type(type, listener, opts)

@@ -308,0 +309,0 @@ }

16

log/index.js

@@ -7,9 +7,15 @@ import { parseId } from '@logux/core'

function showLog(text, details) {
const RED = '#c00000'
function showLog(text, details, color) {
text = '%cLogux%c ' + text
let args = Array.from(text.match(/%c/g)).map((_, i) => {
if (i === 0) {
return 'color:#ffa200;font-weight:bold'
if (color === RED) {
return `color:${color};font-weight:bold`
} else {
return 'color:#ffa200;font-weight:bold'
}
} else if (i % 2 === 0) {
return 'font-weight:bold'
return color ? `font-weight:bold;color:${color}` : 'font-weight:bold'
} else {

@@ -140,3 +146,3 @@ return 'font-weight:normal'

}
showLog(message, details)
showLog(message, details, RED)
} else {

@@ -154,3 +160,3 @@ let details = { Action: action, Meta: meta }

}
showLog(message, details)
showLog(message, details, '#008000')
}

@@ -157,0 +163,0 @@ })

{
"name": "@logux/client",
"version": "0.14.7",
"version": "0.15.0",
"description": "Logux base components to build web client",

@@ -65,8 +65,8 @@ "keywords": [

"dependencies": {
"@logux/actions": "^0.2.1",
"@logux/actions": "^0.2.2",
"fast-json-stable-stringify": "^2.1.0",
"nanodelay": "^2.0.2",
"nanoevents": "^6.0.2",
"nanoid": "^3.2.0"
"nanoid": "^3.3.1"
}
}
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