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

@simbathesailor/use-what-changed

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

@simbathesailor/use-what-changed - npm Package Compare versions

Comparing version 0.1.18 to 0.1.19

8

dist/use-what-changed.cjs.development.js

@@ -102,3 +102,3 @@ 'use strict';

changed = true;
acc[stringSplitted[index] + " \"\u2705\""] = {
acc["\"\u2705\" " + stringSplitted[index]] = {
'Old Value': getPrintableInfo(oldValue),

@@ -108,3 +108,3 @@ 'New Value': getPrintableInfo(dep)

} else {
acc[index + " \"\u2705\""] = {
acc["\"\u2705\" " + index] = {
'Old Value': getPrintableInfo(oldValue),

@@ -119,3 +119,3 @@ 'New Value': getPrintableInfo(dep)

if (dependencyNames && stringSplitted) {
acc[stringSplitted[index] + " \"\u23FA\""] = {
acc["\"\u23FA\" " + stringSplitted[index]] = {
'Old Value': getPrintableInfo(dep),

@@ -125,3 +125,3 @@ 'New Value': getPrintableInfo(dep)

} else {
acc[index + " \"\u23FA\""] = {
acc["\"\u23FA\" " + index] = {
'Old Value': getPrintableInfo(dep),

@@ -128,0 +128,0 @@ 'New Value': getPrintableInfo(dep)

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

"use strict";var e,r=(e=require("react"))&&"object"==typeof e&&"default"in e?e.default:e,t=0,n=function(e){return"[object Object]"===Object.prototype.toString.call(e)};function u(e){if(n(e)||Array.isArray(e)){var r;try{r=JSON.stringify(e,null,2)}catch(e){r="CIRCULAR JSON"}return r}return e}var c="development"===process.env.NODE_ENV;exports.useWhatChanged=function(e,n,a){var o=r.useRef(e),f=r.useRef(1),l=r.useRef(""),i=Array.isArray(o.current);function s(e){c&&console.log("%c What Changed in Effect ID "+f.current+" "+(a||""),"background: "+l.current+"; color: white; font-size: 10px","🧐👇",e.isFirstMount?"FIRST RUN":"UPDATES")}r.useEffect((function(){o.current&&i&&o.current.length>0&&(t++,f.current=t,l.current=function(){for(var e="#",r=0;r<6;r++)e+="0123456789ABCDEF"[Math.floor(16*Math.random())];return e}())}),[o,i]);var d=r.useRef(s);r.useEffect((function(){d.current=s})),r.useEffect((function(){if(o.current&&i&&0!==o.current.length){var r=n?n.split(","):null,t=!1,a=e?e.reduce((function(e,c,a){if(o.current&&c!==o.current[a]){var f=o.current[a];return o.current[a]=c,n&&r?(t=!0,e[r[a]+' "✅"']={"Old Value":u(f),"New Value":u(c)}):e[a+' "✅"']={"Old Value":u(f),"New Value":u(c)},e}return n&&r?e[r[a]+' "⏺"']={"Old Value":u(c),"New Value":u(c)}:e[a+' "⏺"']={"Old Value":u(c),"New Value":u(c)},e}),{}):{};c&&(d.current({isFirstMount:!t}),console.table(a))}}),[].concat(e&&i?e:[],[o,d]))};
"use strict";var e,r=(e=require("react"))&&"object"==typeof e&&"default"in e?e.default:e,t=0,n=function(e){return"[object Object]"===Object.prototype.toString.call(e)};function u(e){if(n(e)||Array.isArray(e)){var r;try{r=JSON.stringify(e,null,2)}catch(e){r="CIRCULAR JSON"}return r}return e}var c="development"===process.env.NODE_ENV;exports.useWhatChanged=function(e,n,a){var o=r.useRef(e),f=r.useRef(1),l=r.useRef(""),i=Array.isArray(o.current);function s(e){c&&console.log("%c What Changed in Effect ID "+f.current+" "+(a||""),"background: "+l.current+"; color: white; font-size: 10px","🧐👇",e.isFirstMount?"FIRST RUN":"UPDATES")}r.useEffect((function(){o.current&&i&&o.current.length>0&&(t++,f.current=t,l.current=function(){for(var e="#",r=0;r<6;r++)e+="0123456789ABCDEF"[Math.floor(16*Math.random())];return e}())}),[o,i]);var d=r.useRef(s);r.useEffect((function(){d.current=s})),r.useEffect((function(){if(o.current&&i&&0!==o.current.length){var r=n?n.split(","):null,t=!1,a=e?e.reduce((function(e,c,a){if(o.current&&c!==o.current[a]){var f=o.current[a];return o.current[a]=c,n&&r?(t=!0,e['"✅" '+r[a]]={"Old Value":u(f),"New Value":u(c)}):e['"✅" '+a]={"Old Value":u(f),"New Value":u(c)},e}return n&&r?e['"⏺" '+r[a]]={"Old Value":u(c),"New Value":u(c)}:e['"⏺" '+a]={"Old Value":u(c),"New Value":u(c)},e}),{}):{};c&&(d.current({isFirstMount:!t}),console.table(a))}}),[].concat(e&&i?e:[],[o,d]))};
//# sourceMappingURL=use-what-changed.cjs.production.min.js.map

@@ -98,3 +98,3 @@ import React from 'react';

changed = true;
acc[stringSplitted[index] + " \"\u2705\""] = {
acc["\"\u2705\" " + stringSplitted[index]] = {
'Old Value': getPrintableInfo(oldValue),

@@ -104,3 +104,3 @@ 'New Value': getPrintableInfo(dep)

} else {
acc[index + " \"\u2705\""] = {
acc["\"\u2705\" " + index] = {
'Old Value': getPrintableInfo(oldValue),

@@ -115,3 +115,3 @@ 'New Value': getPrintableInfo(dep)

if (dependencyNames && stringSplitted) {
acc[stringSplitted[index] + " \"\u23FA\""] = {
acc["\"\u23FA\" " + stringSplitted[index]] = {
'Old Value': getPrintableInfo(dep),

@@ -121,3 +121,3 @@ 'New Value': getPrintableInfo(dep)

} else {
acc[index + " \"\u23FA\""] = {
acc["\"\u23FA\" " + index] = {
'Old Value': getPrintableInfo(dep),

@@ -124,0 +124,0 @@ 'New Value': getPrintableInfo(dep)

{
"name": "@simbathesailor/use-what-changed",
"version": "0.1.18",
"version": "0.1.19",
"license": "MIT",

@@ -5,0 +5,0 @@ "author": "simbathesailor",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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