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

@applitools/functional-commons

Package Overview
Dependencies
Maintainers
12
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/functional-commons - npm Package Compare versions

Comparing version 1.0.21 to 1.0.22

12

package.json
{
"name": "@applitools/functional-commons",
"version": "1.0.21",
"version": "1.0.22",
"description": "",

@@ -37,9 +37,9 @@ "main": "src/functional-commons.js",

"chai": "^4.2.0",
"eslint": "^5.8.0",
"eslint-plugin-mocha-no-only": "^1.0.0",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-prettier": "^2.7.0",
"eslint": "^5.12.0",
"eslint-plugin-mocha-no-only": "^1.1.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-prettier": "^3.0.1",
"mocha": "^5.2.0",
"prettier": "^1.14.3"
"prettier": "^1.15.3"
}
}

@@ -74,2 +74,55 @@ 'use strict'

/**
*
* @param {object} object
* @param {(key:string) => boolean} filterFunc
*
* @returns {object}
*/
function filterKeys(object, filterFunc) {
const ret = {}
for (const [k, v] of Object.entries(object)) {
if (filterFunc(k)) {
ret[k] = v
}
}
return ret
}
/**
* @param {object} object
* @param {(value:any) => boolean} filterFunc
* @returns {object}
*/
function filterValues(object, filterFunc) {
const ret = {}
for (const [k, v] of Object.entries(object)) {
if (filterFunc(v)) {
ret[k] = v
}
}
return ret
}
/**
* @param {object} object
* @param {(entry: [string, any]) => boolean} filterFunc
* @returns {object}
*/
function filterEntries(object, filterFunc) {
const ret = {}
for (const entry of Object.entries(object)) {
if (filterFunc(entry)) {
ret[entry[0]] = entry[1]
}
}
return ret
}
async function failAfter(ms, errFactory) {

@@ -106,4 +159,4 @@ await p(setTimeout)(ms)

),
p(setTimeout)(timeout).then(
() => (promiseResolved ? undefined : ((promiseResolved = true), func())),
p(setTimeout)(timeout).then(() =>
promiseResolved ? undefined : ((promiseResolved = true), func()),
),

@@ -163,2 +216,5 @@ ])

mapValues,
filterKeys,
filterValues,
filterEntries,
failAfter,

@@ -165,0 +221,0 @@ presult,

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