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

@exodus/atoms

Package Overview
Dependencies
Maintainers
83
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exodus/atoms - npm Package Compare versions

Comparing version 2.6.0 to 2.7.0

5

package.json
{
"name": "@exodus/atoms",
"version": "2.6.0",
"version": "2.7.0",
"main": "src/index.js",

@@ -26,2 +26,3 @@ "author": "Exodus Movement Inc.",

"make-concurrent": ">=4 <6",
"p-defer": "^4.0.0",
"proxy-freeze": "^1.0.0"

@@ -34,3 +35,3 @@ },

},
"gitHead": "485c99f84ca2f34c485e20411778f786e9b00c31"
"gitHead": "876d717e70f271148807b5c13eb607d154169717"
}

15

src/factories/memory.js
import { EventEmitter } from 'events'
import fromEventEmitter from '../event-emitter'
import pDefer from 'p-defer'
const createAtomMock = ({ defaultValue }) => {
const createAtomMock = (options = {}) => {
const { defaultValue } = options
let latestValue = defaultValue

@@ -10,6 +13,14 @@

const get = async () => latestValue
const initialized = pDefer()
const get = async () => {
if (!('defaultValue' in options)) {
await initialized.promise
}
return latestValue
}
const set = (data) => {
latestValue = data
initialized.resolve()
emitter.emit('data', data)

@@ -16,0 +27,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