Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

corrections and formatting fixes.

  • Loading branch information...
commit ea1a8f9553dbcc182cdab2d57ce181eef26c3031 1 parent 8be98d9
@jed authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 README.md
View
12 README.md
@@ -4,10 +4,10 @@ pbsb is a tiny javascript function that elegantly merges two common ideas in jav
## overview
- var endpoint = new pbsb // create
+ var endpoint = new pbsb // create
- endpoint.set( value ) // set/publish
- endpoint.get( callback ) // get/subscribe
+ endpoint.set( value ) // set (publish)
+ endpoint.get( callback ) // get (subscribe)
endpoint( valueOrCallback ) // infer get/set by argument
## description
@@ -42,7 +42,7 @@ create an endpoint:
create an endpoint with an initial value:
- var endpoint = pbsb( value ) // if typeof val != "function"
+ var endpoint = pbsb( value ) // if value is not a function
set the endpoint's value:
@@ -59,8 +59,8 @@ let pbsb figure out if you want to get or set:
var log = function( x ){ console.log( x ) }
var val = "this is not a function"
- endpoint( val ) // typeof val != "function", so endpoint.set( val )
- endpoint( log ) // typeof val == "function", so endpoint.get( val )
+ endpoint( val ) // val is not a function, so endpoint.set( val )
+ endpoint( log ) // log is a function, so endpoint.get( log )
get the endpoint's current value AND subscribe to updates:
Please sign in to comment.
Something went wrong with that request. Please try again.