corrade-nucleus-nucleons – Blame information for rev 24

Subversion Repositories:
Rev:
Rev Author Line No. Line
20 office 1 /*
2 The MIT License (MIT)
3  
4 Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors.
5  
6 Permission is hereby granted, free of charge, to any person
7 obtaining a copy of this software and associated documentation files
8 (the "Software"), to deal in the Software without restriction,
9 including without limitation the rights to use, copy, modify, merge,
10 publish, distribute, sublicense, and/or sell copies of the Software,
11 and to permit persons to whom the Software is furnished to do so,
12 subject to the following conditions:
13  
14 The above copyright notice and this permission notice shall be
15 included in all copies or substantial portions of the Software.
16  
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
21 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
22 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 SOFTWARE.
25  
26 */
27  
28 /**
29 The following batches are equivalent:
30  
31 var beautify_js = require('js-beautify');
32 var beautify_js = require('js-beautify').js;
33 var beautify_js = require('js-beautify').js_beautify;
34  
35 var beautify_css = require('js-beautify').css;
36 var beautify_css = require('js-beautify').css_beautify;
37  
38 var beautify_html = require('js-beautify').html;
39 var beautify_html = require('js-beautify').html_beautify;
40  
41 All methods returned accept two arguments, the source string and an options object.
42 **/
43  
44 function get_beautify(js_beautify, css_beautify, html_beautify) {
45 // the default is js
46 var beautify = function(src, config) {
47 return js_beautify.js_beautify(src, config);
48 };
49  
50 // short aliases
51 beautify.js = js_beautify.js_beautify;
52 beautify.css = css_beautify.css_beautify;
53 beautify.html = html_beautify.html_beautify;
54  
55 // legacy aliases
56 beautify.js_beautify = js_beautify.js_beautify;
57 beautify.css_beautify = css_beautify.css_beautify;
58 beautify.html_beautify = html_beautify.html_beautify;
59  
60 return beautify;
61 }
62  
63 if (typeof define === "function" && define.amd) {
64 // Add support for AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- )
65 define([
66 "./lib/beautify",
67 "./lib/beautify-css",
68 "./lib/beautify-html"
69 ], function(js_beautify, css_beautify, html_beautify) {
70 return get_beautify(js_beautify, css_beautify, html_beautify);
71 });
72 } else {
73 (function(mod) {
74 var js_beautify = require('./lib/beautify');
75 var css_beautify = require('./lib/beautify-css');
76 var html_beautify = require('./lib/beautify-html');
77  
78 mod.exports = get_beautify(js_beautify, css_beautify, html_beautify);
79  
80 })(module);
81 }