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

react-native-offline

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-offline - npm Package Compare versions

Comparing version 4.1.1 to 4.1.2

src/utils/getSimilarActionInQueue.js

2

package.json
{
"name": "react-native-offline",
"version": "4.1.1",
"version": "4.1.2",
"description": "Handy toolbelt to deal with offline mode in React Native applications. Cross-platform, provides a smooth redux integration.",

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

# react-native-offline
[![All Contributors](https://img.shields.io/badge/all_contributors-28-orange.svg?style=flat-square)](#contributors)
[![All Contributors](https://img.shields.io/badge/all_contributors-29-orange.svg?style=flat-square)](#contributors)
[![CircleCI](https://circleci.com/gh/rgommezz/react-native-offline.svg?style=shield)](https://circleci.com/gh/rgommezz/react-native-offline) [![npm version](https://badge.fury.io/js/react-native-offline.svg)](https://badge.fury.io/js/react-native-offline) [![Coverage Status](https://coveralls.io/repos/github/rauliyohmc/react-native-offline/badge.svg?branch=master)](https://coveralls.io/github/rauliyohmc/react-native-offline?branch=master)

@@ -686,4 +686,5 @@ [![npm](https://img.shields.io/npm/dm/react-native-offline.svg)]()

| [<img src="https://avatars2.githubusercontent.com/u/5106466?v=4" width="100px;"/><br /><sub><b>MichaΕ‚ PierzchaΕ‚a</b></sub>](https://buymeacoff.ee/thymikee)<br />[πŸ’»](https://github.com/rgommezz/react-native-offline/commits?author=thymikee "Code") | [<img src="https://avatars3.githubusercontent.com/u/119142?v=4" width="100px;"/><br /><sub><b>Ian Graham</b></sub>](https://github.com/imartingraham)<br />[πŸ’»](https://github.com/rgommezz/react-native-offline/commits?author=imartingraham "Code") | [<img src="https://avatars2.githubusercontent.com/u/1244867?v=4" width="100px;"/><br /><sub><b>Petter Samuelsen</b></sub>](http://www.pettersamuelsen.com)<br />[πŸ’»](https://github.com/rgommezz/react-native-offline/commits?author=pettersamuelsen "Code") | [<img src="https://avatars1.githubusercontent.com/u/5339061?v=4" width="100px;"/><br /><sub><b>Lukas Kurucz</b></sub>](https://github.com/usrbowe)<br />[πŸ’»](https://github.com/rgommezz/react-native-offline/commits?author=usrbowe "Code") | [<img src="https://avatars1.githubusercontent.com/u/18237132?v=4" width="100px;"/><br /><sub><b>Norris Oduro</b></sub>](https://twitter.com/norris1z)<br />[πŸ’»](https://github.com/rgommezz/react-native-offline/commits?author=Norris1z "Code") | [<img src="https://avatars3.githubusercontent.com/u/43637878?v=4" width="100px;"/><br /><sub><b>Richard Tan</b></sub>](https://github.com/richardtks)<br />[πŸ€”](#ideas-richardtks "Ideas, Planning, & Feedback") | [<img src="https://avatars3.githubusercontent.com/u/17765105?v=4" width="100px;"/><br /><sub><b>Oleg Kupriianov</b></sub>](https://twitter.com/tysh_pysh)<br />[πŸ’»](https://github.com/rgommezz/react-native-offline/commits?author=Jimbomaniak "Code") |
| [<img src="https://avatars1.githubusercontent.com/u/11155505?v=4" width="100px;"/><br /><sub><b>reilem</b></sub>](https://github.com/reilem)<br />[πŸ€”](#ideas-reilem "Ideas, Planning, & Feedback") |
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
/* @flow */
import { find, get, isEqual } from 'lodash';
import { find, get } from 'lodash';
import {

@@ -9,2 +9,3 @@ fetchOfflineMode,

} from './actionCreators';
import getSimilarActionInQueue from '../utils/getSimilarActionInQueue';
import type { NetworkState } from '../types';

@@ -56,3 +57,3 @@

actionQueue.length > 0
? find(actionQueue, (a: *) => isEqual(a, action))
? getSimilarActionInQueue(action, actionQueue)
: null;

@@ -59,0 +60,0 @@ if (actionQueued) {

/* @flow */
import { get, isEqual, find, without } from 'lodash';
import { get, without } from 'lodash';
import actionTypes from './actionTypes';
import getSimilarActionInQueue from '../utils/getSimilarActionInQueue';
import type {

@@ -34,4 +35,5 @@ FluxAction,

: actionToLookUp;
const similarActionQueued = find(state.actionQueue, (action: *) =>
isEqual(action, actionWithMetaData),
const similarActionQueued = getSimilarActionInQueue(
actionWithMetaData,
state.actionQueue,
);

@@ -56,4 +58,5 @@

): NetworkState {
const similarActionQueued = find(state.actionQueue, (a: *) =>
isEqual(action, a),
const similarActionQueued = getSimilarActionInQueue(
action,
state.actionQueue,
);

@@ -60,0 +63,0 @@

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