New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

melf

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

melf

(A)Synchronous remote procedure calls

latest
Source
npmnpm
Version
2.2.13
Version published
Maintainers
1
Created
Source

Melf melf-logo

npm module to perform (a)synchronous remote procedure calls for JavaScript processes. Synchronous remote procedure calls can be interleaved (only) by locally declared remote procedures without deadlocks.

Client API

require("melf")(address, alias, callback)

  • address :: string | object | melf.Receptor
  • alias :: string
  • callback(error, melf)
    • error :: Error | null
    • melf :: melf.Melf

output = melf.rpcall(recipient, rpname, input)

  • recipient :: string
  • rpname :: string
  • input :: JSON
  • output :: JSON

melf.rpcall(recipient, rpname, input, (error, output) => {...})

  • recipient :: string
  • rpname :: string
  • input :: JSON
  • error :: Error | null
  • output :: JSON

melf.rprocedures[rpname] = (origin, input, callback) => {...}

  • rpname :: string
  • origin :: string
  • input :: JSON
  • callback(error, output)
    • error :: Error | null
    • output :: JSON

melf.destroy()

melf.terminate()

melf.onterminate = () => { ... }

Server API

distributor = require("melf/distributor")(logger)

  • logger(origin, recipient, meteor) | undefined | boolean
    • origin :: string
    • recipient :: string
    • meteor :: string
  • distributor :: melf.Distributor

listener = orchestrator.ConnectionListener()

  • listener(net.Socket)

middleware = distributor.RequestMiddleware(splitter)

  • splitter :: string | undefined
  • handled = middleware(request, response, next)
    • request :: http.Request
    • response :: http.Response
    • next()
    • handled :: boolean

middleware = distributor.UpgradeMiddleware(splitter)

  • splitter :: string | undefined
  • handled = middleware(request, socket, head, next)
    • request :: http.Request
    • socket :: net.Socket
    • head :: Buffer
    • next()
    • handled :: boolean

Keywords

JavaScript

FAQs

Package last updated on 20 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts