• This repository has been archived on 23/Nov/2017
  • Stars
    star
    140
  • Rank 253,948 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 13 years ago
  • Updated over 12 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Postman will help you deliver messages around your JavaScript application

Build Status

Postman

What is it?

Postman is a little JavaScript library (well it's actually Coffeescript but the Cakefile handles a build for me) which is similar to a traditional pub/ sub library, just a whole lot smarter.

Postman does do pub/ sub, but it does it as a message bus, meaning that the order of handler subscription and message publishing isn't important.

It also has no dependencies on external projects so you can drop in the unminified or the minified version and get cracking!

Why?

I decided to write Postman because I wanted a way which I could have a simple message bus in JavaScript so when I subscribed to messages I could get ones sent in the past.

Getting Postman

For web

If you want to use Postman in a website then you can grab the development or production (a whopping 1kb!) and include it.

For Node.js

Postman support Node.js as well, and you can get it through npm:

npm install postman

Then in your Node app:

var postman = require('postman');

Using Postman

If you want to send a message with Postman then you need to have them do a delivery:

postman.deliver('some-message', [arg1, arg2, argN]);

To then subscribe to the messages you need to tell the Postman what you want to receive:

postman.receive('some-message', function() { /* handle callback here */ });

Handling history

Sometimes you don't care about the past so if that's the case you can subscribe and tell it to ignore history:

postman.receive('some-message', function() { /* handle callback here */ }, true);

And for better memory management you can kill history:

postman.dropMessages('some-message');

Or for more powerfull history management you can:

  • Drop messages older than a certain date
  • Drop messages based on an array filter method

Version

0.1.0

License

The MIT License

Copyright (c) 2011 Aaron Powell

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

db.js

db.js is a wrapper for IndexedDB to make it easier to work against
JavaScript
804
star
2

httpstatus

Easily generate different HTTP responses for testing
C#
608
star
3

html2jade-website

A website for converting (and testing) HTML 2 Jade
JavaScript
189
star
4

vscode-profile-switcher

A VS Code extension for switching settings easily
TypeScript
178
star
5

ps-nvm

PowerShell module for managing multiple Node.js versions
PowerShell
126
star
6

sublime-jquery-snippets

Code snippets for developing with jQuery
108
star
7

linq-in-javascript

An implementation of LINQ in JavaScript use ES6 iterators for proper lazy evaluation
JavaScript
81
star
8

FSharp.CosmosDb

An F# wrapper around Cosmos DB's .NET SDK to make it more friendly for F# developers
F#
74
star
9

azure-remix-stack

A remix stack template for running a remix app on Azure
Bicep
73
star
10

webpack-golang-wasm-async-loader

A webpack loader for generating Golang WebAssembly bundles using an async interaction model for calling the Golang code from JavaScript
JavaScript
72
star
11

Chauffeur

Welcome to Chauffeur, deliverying changes to your Umbraco environment in style.
JavaScript
68
star
12

docker-from-scratch

Exercises can be found: https://github.com/aaronpowell/docker-from-scratch/wiki
Dockerfile
64
star
13

DisappointinglyAttributed

Express just how dissapointed you are with others code through attributes!
F#
61
star
14

system-init

Shell
57
star
15

dotnet-delice

📑 A CLI to help you get insight into your projects' licenses
F#
54
star
16

graphql-typescript-workshop

This is a series of exercised to learn how to implement a GraphQL server with TypeScript and do end-to-end type-safety
Shell
52
star
17

tmux-weather

Display weather information in tmux status bar
Shell
35
star
18

tbd

tbd, a JavaScript test data generator
JavaScript
34
star
19

azure-functions-nodejs-openapi

TypeScript
22
star
20

mathy.js

Mathy.js is a simple formula parsing library
JavaScript
20
star
21

react-static-web-apps-auth

A package to make it easier to work with authenticated React apps and Azure Static Web Apps
TypeScript
18
star
22

glimpse-knockout

A Glimpse plugin for inspecting KnockoutJS
JavaScript
17
star
23

ConsoleGPT

ConsoleGPT
C#
16
star
24

graphql-code-generator-sample

This is a sample application using GraphQL Code Generator to convert the GraphQL schema to TypeScript types.
TypeScript
16
star
25

delivR

A port of Delivery.js to SignalR
JavaScript
16
star
26

swa-feliz-template

A GitHub repo template for creating Fable + Feliz apps for Azure Static Web Apps
Shell
13
star
27

aswa-react-template

A template for creating Azure Static Web Apps using React
TypeScript
13
star
28

graphql-azure-subscriptions

TypeScript
12
star
29

go-wasm-experiments

Experimenting with go + wasm
TypeScript
11
star
30

sunshine

Sunshine is an application I use to monitor my solar panels, and is a demo of building an IoT project using Azure.
F#
11
star
31

swa-elmish-template

A GitHub repo template for Elmish apps for Azure Static Web Apps
Shell
11
star
32

BrowserStack-.NET

A .NET API from the BrowserStack automated testing API
C#
11
star
33

aswa-trivia-app

A simple trivia app in React with a GraphQL backend, deployed to Azure Static Web Apps
TypeScript
11
star
34

git-indexeddb

git-indexeddb is an implementation of a js-git db on top of IndexedDB
JavaScript
11
star
35

oz-dev-events

An experiment with WebAssembly + Go on how to build it into a normal web dev pipeline
TypeScript
10
star
36

hybrid-next-on-swa

JavaScript
10
star
37

aaronpowell.github.io

My website
CSS
10
star
38

azure-static-web-apps-api-auth

A package to make it easier to work with Azure Static Web Apps auth in the API backend
HTML
10
star
39

blazor-devto-offline

A demo of how to create DEV.to's offline page using Blazor
HTML
10
star
40

dotnet-graphql-cosmosdb

An example of how to create a .NET GraphQL server on Azure Functions that talks to CosmosDB
C#
9
star
41

Reducks.FSharp

An imagining of Redux as Reducks, written in F#
F#
9
star
42

react-foldable

A set of components to help you work with foldable screens
TypeScript
9
star
43

swa-fable-template

A template for creating F# Azure Static Web Apps, using Fable for the UI
Shell
8
star
44

seq-docker

A docker image for running seq
PowerShell
8
star
45

Owin.HelloWorld

A Hello World implementation on OWIN
C#
8
star
46

vscode-espruino

A Visual Studio Code plugin for working with Espruino
TypeScript
8
star
47

Owin.AuthenticatedTests

JavaScript
7
star
48

Sublime-KnockoutJS-Snippets

Code snippets for KnockoutJS
7
star
49

keystone-6-azure-example

A sample application for running Keystone 6 on Azure
TypeScript
7
star
50

fsharp-swa-trivia-app

F#
6
star
51

typescript-pubsub

Run "tsc -sourcemap pubsub.ts" for a Source Map demo
6
star
52

apollo-graphql-appinsights

An example of how to integrate AppInsights into Apollo GraphQL
TypeScript
6
star
53

trivia-api

JavaScript
6
star
54

GenerateAndChill

A demo app of how to use Azure OpenAI Service to generate verify prompts and generate images.
Bicep
6
star
55

azure-functions-graphql

An example of how to create a GraphQL server on Azure Functions
TypeScript
5
star
56

reply

A simple React-based chat application
JavaScript
5
star
57

pinboard-bridge

JavaScript
5
star
58

react-app-insights

JavaScript
5
star
59

KnockoutJS-Pre-parser

A pre-parser for KnockoutJS to use more convention-based discovery for the data binding
JavaScript
5
star
60

appservice-graphql-dotnet

A sample of an ASP.NET GraphQL server
C#
5
star
61

Surrealism

An implementation of Surreal.js - https://github.com/coldhead/surreal.js, a Surreal Number generator written in .NET. Includes basic arithmatic operations
C#
5
star
62

aci-from-scratch

A series of exercises to get you to learn Azure Container Instances
5
star
63

WhatKey

A simple little website for testing JavaScript keyboard events
JavaScript
4
star
64

redux-ko

An example of how to create a custom binding for redux, using knockoutjs
HTML
4
star
65

aspnet-vnext-samples

A series of samples for ASP.NET vNext
C#
4
star
66

dab-library-blazor-sample

HTML
4
star
67

talks

Various talks I've given
CSS
3
star
68

cosmosdb-conf-fsharp

F#
3
star
69

flight-mode-blog

Code for the blog post series http://www.aaron-powell/flight-mode/introduction
JavaScript
3
star
70

Bob

Bob wasn't a great product for Microsoft but maybe Bob can add what's missing for Windows 8
C#
3
star
71

Kendo-UI-Bootstrapper

A library to make object-based Kendo UI development easier
JavaScript
3
star
72

uRested

A convenience wrapper around the Umbraco RestApi to remove the boilerplate you would have to write
C#
3
star
73

dab-blazor-trivia-demo

A demo application using Blazor and SWA Database Connections
CSS
3
star
74

typed-typescript-functions-demo

A demo on how to type the various components of TypeScript Azure Functions
TypeScript
3
star
75

blog-card-generator

Generate an open-graph friendly image from a blog post
F#
3
star
76

indexeddb-filesystem

A sample of how to implement a file system in indexedDB
JavaScript
3
star
77

swa-custom-auth-auth0

A sample of how to setup SWA custom OIDC providers using Auth0
TypeScript
3
star
78

durable-cinema

A sample SPA that uses Azure Functions for the backend
TypeScript
2
star
79

glue

Glue will stick your objects into your HTML
JavaScript
2
star
80

react-workshop-redux

JavaScript
2
star
81

uduf-2019-testing-umbraco

Samples from my testing Umbraco talk from uduf 2019
JavaScript
2
star
82

react-workshop-hoc

JavaScript
2
star
83

Medallion.js

An API for WinJS badges that's like designed for JavaScript development
JavaScript
2
star
84

luke.net

C#
2
star
85

JavaScript-Quiz

Source code and blog for JavaScript Quiz
CoffeeScript
2
star
86

durable-functions-workflow-demo

A simple demo of how Durable Functions can be used for a workflow
F#
2
star
87

redux-rx-demo

A demo of using redux as an observable stream and combining it with rxjs
JavaScript
2
star
88

doinnothin

A site for tracking when you're doing nothing
JavaScript
2
star
89

Chauffeur.uSync

A plugin for Chauffeur for integrating with uSync
CSS
2
star
90

QLDITRelief

A small website to getting IT relief for the Queensland flood victims
Ruby
2
star
91

react-workshop-2018-impl

JavaScript
2
star
92

end-to-end-graphql-workshop

TypeScript
2
star
93

1password-cli-docker

Dockerfile for creating an image containing the 1password cli tool
PowerShell
2
star
94

nextjs-graphql-trivia-demo

Shell
2
star
95

Coffeepud

Notepud with coffee
JavaScript
2
star
96

token-store-demo

A sample of how to use token store from JavaScript and .NET
HTML
2
star
97

wdyk

What Do You Know - Hosted ALL The Things
JavaScript
2
star
98

gatsby-static-web-app

CSS
1
star
99

javascript-compression-tests

JavaScript compression tests
JavaScript
1
star
100

react-workshop-hello-react

HTML
1
star