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

@canvas-js/utils

Package Overview
Dependencies
Maintainers
3
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@canvas-js/utils - npm Package Compare versions

Comparing version 0.13.0-next.2 to 0.13.0-next.3

1

lib/values.d.ts

@@ -18,1 +18,2 @@ export type JSValue = null | boolean | number | string | Uint8Array | JSArray | JSObject;

export declare function merge(from: JSValue, into: JSValue): JSValue;
export declare function update(from: JSValue, into: JSValue): JSValue;

@@ -70,1 +70,41 @@ // Values

}
export function update(from, into) {
if (from === null) {
return from;
}
else if (typeof from === "boolean") {
return from;
}
else if (typeof from === "number") {
return from;
}
else if (typeof from === "string") {
return from;
}
else if (from instanceof Uint8Array) {
return from;
}
else if (Array.isArray(from)) {
return from;
}
else {
// update fields without recursive merging
if (!isObject(from))
return from;
if (!isObject(into))
return from;
const result = { ...into };
for (const key of Object.keys(from)) {
if (from[key] === undefined) {
result[key] = into[key];
}
else if (into[key] === undefined) {
result[key] = from[key];
}
else {
result[key] = from[key];
}
}
return result;
}
}

4

package.json
{
"name": "@canvas-js/utils",
"version": "0.13.0-next.2",
"version": "0.13.0-next.3",
"author": "Canvas Technologies, Inc. (https://canvas.xyz)",

@@ -19,4 +19,4 @@ "type": "module",

"dependencies": {
"@canvas-js/interfaces": "0.13.0-next.2"
"@canvas-js/interfaces": "0.13.0-next.3"
}
}
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