forked from beautifier/js-beautify
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
35 lines (27 loc) · 1.01 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
The following batches are equivalent:
var beautify_js = require('js-beautify');
var beautify_js = require('js-beautify').js;
var beautify_js = require('js-beautify').js_beautify;
var beautify_css = require('js-beautify').css;
var beautify_css = require('js-beautify').css_beautify;
var beautify_html = require('js-beautify').html;
var beautify_html = require('js-beautify').html_beautify;
All methods returned accept two arguments, the source string and an options object.
**/
var js_beautify = require('./beautify').js_beautify;
var css_beautify = require('./beautify-css').css_beautify;
var html_beautify = require('./beautify-html').html_beautify;
// the default is js
var beautify = function (src, config) {
return js_beautify(src, config);
};
// short aliases
beautify.js = js_beautify;
beautify.css = css_beautify;
beautify.html = html_beautify;
// legacy aliases
beautify.js_beautify = js_beautify;
beautify.css_beautify = css_beautify;
beautify.html_beautify = html_beautify;
module.exports = beautify;