Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@riotjs/util

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@riotjs/util - npm Package Compare versions

Comparing version 2.2.4 to 2.3.0

18

objects.js

@@ -0,1 +1,3 @@

import { isObject } from './checks.js'
/**

@@ -58,3 +60,17 @@ * Helper function to set an immutable property

export function cloneDeep(source) {
return JSON.parse(JSON.stringify(source))
return structuredClone(source)
}
/**
* Like Array.prototype.filter but for objects
* @param {Object} source - target object
* @param {Funciton} filter - filter function
* @return {Object} filtered source or the original source received
*/
export function filter(source, filter) {
return isObject(source)
? Object.fromEntries(
Object.entries(source).filter(([key, value]) => filter(key, value)),
)
: source
}

2

package.json
{
"name": "@riotjs/util",
"version": "2.2.4",
"version": "2.3.0",
"description": "Riot.js util functions",

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

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