
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
rpcinterface
Advanced tools
Build a rpc interface in your webapp or node app. Requires jQuery for promises on the web (via browserify).
var rpc = require('rpcinterface');
Creates a new RPCInterface instance. Should be done at application start up.
Adds a new handler for method name. options should be an object that has
handler and params keys. handler is a callback that is called with
(parameters, deferred) when a new call is made for this method name. If
params are not defined then no parameter checking is done.
params should be a hash like this example:
{
email: {type: 'string', optional: false},
password: {type: 'string', optional: false},
name: {type: 'string', optional: false},
phone: {type: 'number', optional: true}
}
If params is null (rather than an object or undefined) then the parameters
object sent to the handler will be an empty object, guaranteed. Normally the
passed object is validated but passed through as originally sent. This could
cause issues if you're expecting an empty object since your method accepts no
parameters but the caller sent extraneous parameters.
Removes the handler for method name.
Sets the pre-processor, which is called before the handler but after the request is
validated. The func is sent (method, params, dfd). method is the string method
name being called and params is the parameters object sent by the caller.
Calls a method added by addMethod and sends along the passed params. Returns a
deferred. Throws if params are invalid/missing for the method being called or if
the method wasn't added. params can also be an array where the order of the values
is based on the defined order when addMethod was called.
FAQs
Library that facilitates an RPC interface in a webapp or node app
We found that rpcinterface demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.