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

rpc-protocol

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rpc-protocol - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

package.json
{
"name": "rpc-protocol",
"version": "0.1.1",
"version": "0.1.2",
"description": "Create and run commands over a RPC protocol stream",

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

@@ -45,8 +45,12 @@ const serializeError = require('serialize-error')

if ('function' === typeof value) {
if ('function' !== value.toString().slice(0, 8)) {
if ('(' !== value.toString()[0]) {
value = `function ${value}`
const original = value
const isAsync = value.toString().match(/^async\s+/)
let string = value.toString().replace(/^async\s+/, '')
if (!/^function/.test(string)) {
if ('(' !== string.toString()[0]) {
value = `${isAsync ? 'async ' : ''}function ${string}`
}
}
try {

@@ -53,0 +57,0 @@ const source = `return ${value.toString()}`

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