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

@ebflat9/fp

Package Overview
Dependencies
Maintainers
1
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ebflat9/fp - npm Package Compare versions

Comparing version 1.1.23 to 1.1.24

2

package.json
{
"name": "@ebflat9/fp",
"version": "1.1.23",
"version": "1.1.24",
"description": "my fp utils",

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

@@ -779,3 +779,14 @@ /**

aux = new obj.constructor()
Object.getOwnPropertyNames(obj).forEach(prop => (aux[prop] = deepCopy(obj[prop])))
if (isMap(aux)) {
for (const key of obj.keys()) {
const keyCopy = deepCopy(key)
aux.set(keyCopy, obj.get(key))
}
} else if (isSet(aux)) {
for (const val of obj.values()) {
aux.add(val)
}
} else {
Object.getOwnPropertyNames(obj).forEach(prop => (aux[prop] = deepCopy(obj[prop])))
}
}

@@ -782,0 +793,0 @@ return aux

@@ -748,5 +748,33 @@ import * as combinators from '../src/combinators.js'

assert.deepEqual(combinators.diff(a, b), { age: 16 })
assert.deepEqual(combinators.merge(b, combinators.diff(a, b)), b)
const merged = combinators.merge(b, combinators.diff(a, b))
assert.deepEqual(merged, b)
assert.notEqual(merged, b)
})
})
describe('deepCopy', function () {
it('should copy maps, sets and objects', function () {
const s = new Set([1, 2, 3])
assert.deepEqual(combinators.deepCopy(s), new Set([1, 2, 3]))
const m = new Map([
['hi', 'there'],
[{}, null],
])
assert.deepEqual(
combinators.deepCopy(m),
new Map([
['hi', 'there'],
[{}, null],
])
)
const o = {
a: {
b: 'x',
},
c: ['cat'],
}
assert.deepEqual(combinators.deepCopy(o), o)
assert.notEqual(combinators.deepCopy(o), o)
})
})
})
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