npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

simpleesb

v0.1.39

Published

Provides basic ESB services to transfer data between applications.

Readme

SimpleESB


A simple ESB application that can be used for Application Integration. This ESB is simple and uses the concept(s) of an itineray which contains on-ramp(s), transform(s), off-ramp(s) and message events. An on-ramp is an entry point onto the bus, likewise an off-ramp is an exit point off of the bus. A transformation is the reorganization of the message that was received on the bus into a new format. Finally, a message event is used to link the itinerary artifacts together (on-ramp, off-ramp, transform). The following features are currently supported.

Features

  • On-Ramps
    • File
    • Excel
    • Amazon SQS
  • Off-Ramps
    • Debug
    • Http
    • Amazon SQS
  • Transformations
    • JSON-to-JSON

Limitations

Currently the ESB is only designed to work with JSON data. All messages must be in a JSON format when they leave the on-ramp into the bus.

Sample Overview

The sample illustrates using the SimpleESB to transfer orders from a front end e-commerce website to a backend order fulfillment system.

Simple ESB Diagram

Sample Itinerary

var SimpleESB = require('simpleesb');

var yourmap = require('../transforms/yourmap');

exports.itinerary = new SimpleESB.Itinerary()
	.OnRamp(
		new SimpleESB.OnRamps.SqsOnRamp()						
			.publishAs('onramp::test')
			.provider(SimpleESB.SqsClientProvider.autoConfigure())
			.queue('/054218599934/Test'))
	
	.Transform(
		new SimpleESB.TransformService()			
			.provider(yourmap.createMap())
			.subscribeTo('onramp::test')
			.publishAs('transformed::test'))	

	.OffRamp(
		new SimpleESB.OffRamps.HttpOffRamp()
			.subscribeTo('transformed::test')
			.HttpMethod('POST')
			.Destination('http://localhost:8080/test/publish')
		);

Sample Map

var SimpleESB = require('simpleesb');

var yourmap = function() {
	
	return new SimpleESB.JsonMap()
		.field('*', 'status', function(source){ return 'PENDING'; })
		.field('created_at', 'createdOn')
		.field('payment.po_number', 'masterOrderNumber')
		.field('shipping_address.street', 'shipAddress')
		.field('shipping_address.city', 'shipCity')
		.field('shipping_address.region', 'shipState')
		.field('shipping_address.postcode', 'shipPostalCode')
		.field('*', 'shipTo', function(source) { return source.shipping_address.firstname + ' ' + source.shipping_address.lastname; })
		.field('customer_email', 'shipEmail')
		.field('shipping_address.telephone', 'shipPhone')
		.field('', 'shipMethod')
		.field('customer_email', 'userEmail')
		.field('', 'facilityName')		
		
		.collection('items', 'details', 
				new SimpleESB.JsonMap()
					.field('discount_amount', 'discount')
					.field('row_total', 'lineTotal')
					.field('qty_ordered', 'quantity')
					.field('price', 'salePrice')
					.field('tax_amount', 'salesTax')
					.field('price', 'unitPrice')
					.field('sku', 'sku')
					);
};

module.exports.createMap = yourmap;

Notes: When mapping you typically supply a source field and a destination field. However, as you can see above you are also able to add a 3rd argument to specify a Javascript function to use when mapping the specified field. If you are using a Javascript function then you must specify an * in the source field. When mapping a collection you will use the keyword collection and supply another map to use on the collection.

Running

To run the Simple ESB you can simply add the following to your application startup routine.

	require('simpleesb').start();