Socket
Socket
Sign inDemoInstall

@percy/core

Package Overview
Dependencies
Maintainers
6
Versions
238
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@percy/core - npm Package Compare versions

Comparing version 1.6.3 to 1.6.4

7

dist/utils.js

@@ -185,7 +185,10 @@ import EventEmitter from 'events';

}
} // Serializes the provided function with percy helpers for use in evaluating browser scripts
} // Used to test if a string looks like a function
const FUNC_REG = /^(async\s+)?(function\s*)?(\w+\s*)?\(.*?\)\s*(\{|=>)/is; // Serializes the provided function with percy helpers for use in evaluating browser scripts
export function serializeFunction(fn) {
let fnbody = typeof fn === 'string' ? `async eval() {\n${fn}\n}` : fn.toString(); // we might have a function shorthand if this fails
// stringify or convert a function body into a complete function
let fnbody = typeof fn === 'string' && !FUNC_REG.test(fn) ? `async function eval() {\n${fn}\n}` : fn.toString(); // we might have a function shorthand if this fails

@@ -192,0 +195,0 @@ /* eslint-disable-next-line no-new, no-new-func */

{
"name": "@percy/core",
"version": "1.6.3",
"version": "1.6.4",
"license": "MIT",

@@ -42,6 +42,6 @@ "repository": {

"dependencies": {
"@percy/client": "1.6.3",
"@percy/config": "1.6.3",
"@percy/dom": "1.6.3",
"@percy/logger": "1.6.3",
"@percy/client": "1.6.4",
"@percy/config": "1.6.4",
"@percy/dom": "1.6.4",
"@percy/logger": "1.6.4",
"content-disposition": "^0.5.4",

@@ -57,3 +57,3 @@ "cross-spawn": "^7.0.3",

},
"gitHead": "ab48a150317a4af36d536a5671701532c669d2d1"
"gitHead": "651c0fad62f128053723f9b8d565c69496dc51e4"
}
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