Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add syntax highlighting to intro #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ and [q].
Unlike many other utility packages for `Promise`, `prfun` does not
pollute the global namespace. By default `prfun` creates a `Promise`
subclass, using ES6 semantics. This means you use it like:
```
```js
var Promise = require('prfun'); // subclasses global.Promise
// note that global.Promise !== Promise after this point
```
or
```
```js
var SomeOtherPromise = require( /*something*/ );
var Promise = require('prfun/wrap')( SomeOtherPromise );
// Note that the same `Promise` object will always be
Expand All @@ -53,7 +53,7 @@ If your code is given a promise from an outside API, and you can't
guarantee that it is a `prfun` Promise, then you can use
`Promise.resolve` in order to cast the outside promise to a `prfun`
`Promise`. For example:
```
```js
var Promise = require('prfun'); // this is a "prfun Promise"

function myApi(externalPromise) {
Expand All @@ -65,7 +65,7 @@ function myApi(externalPromise) {

In order to *modify the global `Promise` object* (instead of
subclassing), use:
```
```js
require('prfun/smash');
// global.Promise.reduce, global.Promise.tap, etc, now exist.
```
Expand Down