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

@culturehq/client

Package Overview
Dependencies
Maintainers
1
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@culturehq/client - npm Package Compare versions

Comparing version 10.0.0 to 10.0.1

9

CHANGELOG.md

@@ -9,2 +9,8 @@ # Changelog

## [10.0.1] - 2019-08-21
### Changed
- Fixed up new `@rails/actioncable` usage.
## [10.0.0] - 2019-08-21

@@ -1430,3 +1436,4 @@

[unreleased]: https://github.com/CultureHQ/client/compare/v10.0.0...HEAD
[unreleased]: https://github.com/CultureHQ/client/compare/v10.0.1...HEAD
[10.0.1]: https://github.com/CultureHQ/client/compare/v10.0.0...v10.0.1
[10.0.0]: https://github.com/CultureHQ/client/compare/v9.7.0...v10.0.0

@@ -1433,0 +1440,0 @@ [9.7.0]: https://github.com/CultureHQ/client/compare/v9.6.1...v9.7.0

35

dist/cable.js

@@ -8,3 +8,3 @@ "use strict";

var _actioncable = _interopRequireDefault(require("@rails/actioncable"));
var _actioncable = require("@rails/actioncable");

@@ -41,3 +41,3 @@ var _constants = require("./constants");

if (!consumer) {
consumer = _actioncable["default"].createConsumer(getEndpoint());
consumer = (0, _actioncable.createConsumer)(getEndpoint());
}

@@ -55,25 +55,18 @@

*
* import React, { useEffect } from "react";
* import { onNotificationReceived } from "@culturehq/client";
*
* class MyComponent {
* state = { lastNotification: null };
* const MyComponent = () => {
* const [lastNotification, setLastNotification] = useState(null);
*
* componentDidMount() {
* this.subscription = onNotificationReceived(notification => {
* this.setState({ lastNotification: notification });
* });
* }
* useEffect(
* () => {
* const subscription = onNotificationReceived(setLastNotification);
* return () => subscription.unsubscribe();
* },
* [setLastNotification]
* );
*
* componentWillUnmount() {
* if (this.subscription) {
* this.subscription.unsubscribe();
* }
* }
*
* render() {
* const { lastNotification } = this.state;
*
* return <span>{lastNotification}<span>;
* }
* }
* return <span>{lastNotification}<span>;
* };
*/

@@ -80,0 +73,0 @@

{
"name": "@culturehq/client",
"version": "10.0.0",
"version": "10.0.1",
"description": "A JavaScript client that wraps the CultureHQ API",

@@ -5,0 +5,0 @@ "main": "dist/client.js",

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

import ActionCable from "@rails/actioncable";
import { createConsumer } from "@rails/actioncable";

@@ -17,3 +17,3 @@ import { API_HOST } from "./constants";

if (!consumer) {
consumer = ActionCable.createConsumer(getEndpoint());
consumer = createConsumer(getEndpoint());
}

@@ -31,25 +31,18 @@ return consumer;

*
* import React, { useEffect } from "react";
* import { onNotificationReceived } from "@culturehq/client";
*
* class MyComponent {
* state = { lastNotification: null };
* const MyComponent = () => {
* const [lastNotification, setLastNotification] = useState(null);
*
* componentDidMount() {
* this.subscription = onNotificationReceived(notification => {
* this.setState({ lastNotification: notification });
* });
* }
* useEffect(
* () => {
* const subscription = onNotificationReceived(setLastNotification);
* return () => subscription.unsubscribe();
* },
* [setLastNotification]
* );
*
* componentWillUnmount() {
* if (this.subscription) {
* this.subscription.unsubscribe();
* }
* }
*
* render() {
* const { lastNotification } = this.state;
*
* return <span>{lastNotification}<span>;
* }
* }
* return <span>{lastNotification}<span>;
* };
*/

@@ -56,0 +49,0 @@ const subscribe = channel => callback => (

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