UNPKG

827 BJavaScriptView Raw
1'use strict';
2/**
3 * index-browser module
4 * @module index-browser
5 * @see module:index
6 */
7const lang = require('zero-lang');
8const dom2js = require('./dom2js');
9const dom2json = require('./dom2json');
10const escape = require('./escape');
11const getInnerXML = require('./get-inner-xml');
12const js2xml = require('./js2xml');
13const json2xml = require('./json2xml');
14const sanitize = require('./sanitize');
15const unescape = require('./unescape');
16const xml = require('./xml');
17const xml2js = require('./xml2js');
18const xml2json = require('./xml2json');
19
20lang.extend(xml, {
21 ENV: 'browser',
22 dom2js,
23 dom2json,
24 domParser: new DOMParser(),
25 escape,
26 getInnerXML,
27 getOuterXML: xml.serialize,
28 js2xml,
29 json2xml,
30 sanitize,
31 unescape,
32 xml2js,
33 xml2json,
34 xmlSerializer: new XMLSerializer(),
35});
36
37module.exports = xml;