Skip to content

Adjust export for Common.js Node-like environments.#27

Merged
cure53 merged 1 commit intocure53:masterfrom
djfarrelly:master
Jun 17, 2014
Merged

Adjust export for Common.js Node-like environments.#27
cure53 merged 1 commit intocure53:masterfrom
djfarrelly:master

Conversation

@djfarrelly
Copy link
Copy Markdown
Contributor

Currently, when you require DOMPurify in Node.js environments or similar (like Browserify) an object containing DOMPurify is being exported and not the DOMPurify object itself. This small change allows this cleaner require:

var DOMPurify = require('dompurify');

Instead of the current:

var DOMPurify = require('dompurify').DOMPurify;

Here's a working example on RequireBin: http://requirebin.com/?gist=a597860855d59cadfaeb

cure53 added a commit that referenced this pull request Jun 17, 2014
Adjust export for Common.js Node-like environments.
@cure53 cure53 merged commit b160a48 into cure53:master Jun 17, 2014
@cure53
Copy link
Copy Markdown
Owner

cure53 commented Jun 17, 2014

Thanks!

@fhemberger fhemberger mentioned this pull request Jul 6, 2014
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants