Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including sender-rewriting-scheme with all npm packages installed. Try it out:

var senderRewritingScheme = require("sender-rewriting-scheme")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

sender-rewriting-scheme v1.0.0

Forward and reverse email addresses with SRS (Sender Rewriting Scheme).

Sender Rewriting Scheme for Node.

Written for and maintained by Ptorx, a proxy email service.

import { SRS } from 'sender-rewriting-scheme';

const srs = new SRS({
  separator: '=', // default
  secret: 'test1', // required
  maxAge: 30 // default
});

srs.forward('user@example.com', 'forward.com');
// SRS0=5884=RN=example.com=user@forward.com

srs.reverse('SRS0=5884=RN=example.com=user@forward.com');
// user@example.com
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free