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

use-deep-compare

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-deep-compare - npm Package Compare versions

Comparing version 0.1.0 to 1.0.0

dist-node/index.js.map

1

dist-node/index.js

@@ -92,1 +92,2 @@ 'use strict';

exports.useDeepCompareMemo = useDeepCompareMemo;
//# sourceMappingURL=index.js.map

2

dist-types/useDeepCompareMemoize.d.ts
import React from 'react';
export declare function isPrimitive(val: any): boolean;
export declare function checkDeps(deps: React.DependencyList, name: string): void;
export declare function useDeepCompareMemoize(value: React.DependencyList): readonly any[];
export declare function useDeepCompareMemoize(value: React.DependencyList): React.DependencyList;

@@ -8,10 +8,10 @@ import React from 'react';

function checkDeps(deps, name) {
const reactHookName = "React.".concat(name.replace(/DeepCompare/, ''));
const reactHookName = `React.${name.replace(/DeepCompare/, '')}`;
if (!deps || deps.length === 0) {
throw new Error("".concat(name, " should not be used with no dependencies. Use ").concat(reactHookName, " instead."));
throw new Error(`${name} should not be used with no dependencies. Use ${reactHookName} instead.`);
}
if (deps.every(isPrimitive)) {
throw new Error("".concat(name, " should not be used with dependencies that are all primitive values. Use ").concat(reactHookName, " instead."));
throw new Error(`${name} should not be used with dependencies that are all primitive values. Use ${reactHookName} instead.`);
}

@@ -85,1 +85,2 @@ }

export { useDeepCompareCallback, useDeepCompareEffect, useDeepCompareMemo };
//# sourceMappingURL=index.js.map
{
"name": "use-deep-compare",
"version": "0.1.0",
"description": "React hooks, except using deep comparison on the inputs, not reference equality",
"version": "1.0.0",
"license": "MIT",
"esnext": "dist-src/index.js",
"main": "dist-node/index.js",
"module": "dist-web/index.js",
"types": "dist-types/index.d.ts",
"pika": true,
"sideEffects": false,
"files": [
"dist-*/",
"assets/",
"bin/"
],
"pika": true,
"sideEffects": false,
"repository": {
"type": "git",
"url": "https://github.com/sandiiarov/use-deep-compare.git"
},
"dependencies": {

@@ -23,14 +23,18 @@ "dequal": "1.0.0"

"devDependencies": {
"@babel/preset-react": "7.0.0",
"@babel/preset-typescript": "7.3.3",
"@pika/pack": "0.3.6",
"@pika/plugin-build-node": "0.3.14",
"@pika/plugin-build-types": "0.3.14",
"@pika/plugin-build-web": "0.3.14",
"@pika/plugin-standard-pkg": "0.3.14",
"@types/react": "16.8.10",
"react": "16.8.6",
"react-dom": "16.8.6",
"typescript": "3.4.1"
}
"@babel/preset-react": "7.10.1",
"@babel/preset-typescript": "7.10.1",
"@pika/pack": "0.5.0",
"@pika/plugin-build-node": "0.9.2",
"@pika/plugin-build-types": "0.9.2",
"@pika/plugin-build-web": "0.9.2",
"@pika/plugin-standard-pkg": "0.9.2",
"@types/react": "16.9.35",
"react": "16.13.1",
"react-dom": "16.13.1",
"typescript": "3.9.3"
},
"esnext": "dist-src/index.js",
"main": "dist-node/index.js",
"module": "dist-web/index.js",
"types": "dist-types/index.d.ts"
}
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