diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-08-16 14:45:54 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-08-16 14:45:54 +0100 |
| commit | 4900c2cf3e66822a33e528fc5f275a3031496006 (patch) | |
| tree | a9e773cdcd932129fc70048028bef278c1f0b65a /lib/xml/nodes.js | |
| parent | 63546974b87e3ce7167a3077db33b49e27006197 (diff) | |
Extract text node constructor to nodes module
Diffstat (limited to 'lib/xml/nodes.js')
| -rw-r--r-- | lib/xml/nodes.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/xml/nodes.js b/lib/xml/nodes.js index ed273cf..8232684 100644 --- a/lib/xml/nodes.js +++ b/lib/xml/nodes.js @@ -2,6 +2,15 @@ var _ = require("underscore"); exports.Element = Element; +exports.element = function(name, attributes, children) { + return new Element(); +}; +exports.text = function(value) { + return { + type: "text", + value: value + }; +}; var emptyElement = { |
