Skip to content

Commit e323e22

Browse files
committed
Added exports to module to support for require with browserify.
1 parent 9669f8d commit e323e22

File tree

6 files changed

+47
-8
lines changed

6 files changed

+47
-8
lines changed

HTMLString-1.0.3.tgz

25.5 KB
Binary file not shown.

build/html-string.js

Lines changed: 21 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/html-string.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

external/fsm.js

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "HTMLString",
33
"description": "An HTML parser written in JavaScript that's probably not what you're looking for.",
4-
"version": "1.0.2",
4+
"version": "1.0.3",
55
"keywords": [
66
"html",
77
"parser"

src/namespace.coffee

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1-
window.HTMLString = {}
1+
HTMLString = {}
2+
3+
4+
# Export the namespace
5+
6+
# Browser (via window)
7+
if typeof window != 'undefined'
8+
window.HTMLString = HTMLString
9+
10+
# Node/Browserify
11+
if typeof module != 'undefined' and module.exports
12+
exports = module.exports = HTMLString

0 commit comments

Comments
 (0)