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

react-jsbox

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-jsbox - npm Package Compare versions

Comparing version 0.0.24 to 0.0.25

4

package.json
{
"name": "react-jsbox",
"version": "0.0.24",
"version": "0.0.25",
"description": "A Custom React Renderer for writing JSBox apps in React.",

@@ -19,3 +19,3 @@ "keywords": [

"author": "Eva1ent",
"repository": "github:186c0/react-jsbox-renderer",
"repository": "github:Nicify/react-jsbox-renderer",
"babel": {

@@ -22,0 +22,0 @@ "presets": [

@@ -6,3 +6,5 @@ const DEBUG = false

global.console.log = hookArgs(console.log, (...args) =>
args.map(arg => JSON.parse(JSON.stringify(arg, getCircularReplacer())))
args.map(arg =>
arg === undefined ? 'undefined' : JSON.stringify(arg, getCircularReplacer())
)
)

@@ -17,3 +19,3 @@ }

export const { now } = Date
export const {now} = Date

@@ -52,3 +54,3 @@ // Based on react-three-fiber ((c) 2019 Paul Henschel, MIT).

].reduce((acc, prop) => {
let { [prop]: _, ...rest } = acc
let {[prop]: _, ...rest} = acc
return rest

@@ -75,4 +77,6 @@ }, newProps)

let args = argsGetter.apply(this, arguments)
for (let i = 0; i < args.length; ++i) {
arguments[i] = args[i]
if (Array.isArray(args)) {
for (let i = 0; i < args.length; ++i) {
arguments[i] = args[i]
}
}

@@ -79,0 +83,0 @@ return originalFn.apply(this, arguments)

import {useEffect, useState} from 'react'
const useCache = (key, initialValue, raw) => {
const useCache = (key, initialValue) => {
const [state, setState] = useState(() => {
try {
const cacheValue = $cache.get(key)
if (typeof cacheValue !== 'string') {
$cache.set(key, raw ? String(initialValue) : JSON.stringify(initialValue))
return initialValue
} else {
return raw ? cacheValue : JSON.parse(cacheValue || 'null')
}
} catch {
const cacheValue = $cache.get(key)
if (cacheValue === undefined) {
$cache.set(key, initialValue)
return initialValue
}
return cacheValue
})

@@ -20,4 +15,3 @@

try {
const serializedState = raw ? String(state) : JSON.stringify(state)
$cache.set(key, serializedState)
$cache.set(key, state)
} catch {}

@@ -24,0 +18,0 @@ })

Sorry, the diff of this file is too big to display

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