js-beautify 1.13.7 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -61,17 +61,17 @@ JS Beautifier is hosted on two CDN services: [cdnjs](https://cdnjs.com/libraries
61
61
 
62
62
  To pull the latest version from one of these services include one set of the script tags below in your document:
63
63
  ```html
64
- <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.13.7/beautify.js"></script>
65
- <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.13.7/beautify-css.js"></script>
66
- <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.13.7/beautify-html.js"></script>
64
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.0/beautify.js"></script>
65
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.0/beautify-css.js"></script>
66
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.0/beautify-html.js"></script>
67
67
 
68
- <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.13.7/beautify.min.js"></script>
69
- <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.13.7/beautify-css.min.js"></script>
70
- <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.13.7/beautify-html.min.js"></script>
68
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.0/beautify.min.js"></script>
69
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.0/beautify-css.min.js"></script>
70
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.0/beautify-html.min.js"></script>
71
71
 
72
- <script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.13.7/js/lib/beautify.js"></script>
73
- <script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.13.7/js/lib/beautify-css.js"></script>
74
- <script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.13.7/js/lib/beautify-html.js"></script>
72
+ <script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.14.0/js/lib/beautify.js"></script>
73
+ <script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.14.0/js/lib/beautify-css.js"></script>
74
+ <script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.14.0/js/lib/beautify-html.js"></script>
75
75
  ```
76
76
 
77
77
  Older versions are available by changing the version number.
@@ -404,4 +404,4 @@ Thanks also to Jason Diamond, Patrick Hof, Nochum Sossonko, Andreas Schneider, D
404
404
  Vasilevsky, Vital Batmanov, Ron Baldwin, Gabriel Harrison, Chris J. Shull,
405
405
  Mathias Bynens, Vittorio Gambaletta and others.
406
406
 
407
- (README.md: js-beautify@1.13.7)
407
+ (README.md: js-beautify@1.14.0)
@@ -8,97 +8,12 @@
8
8
  else
9
9
  root["beautifier"] = factory();
10
10
  })(typeof self !== 'undefined' ? self : typeof windows !== 'undefined' ? window : typeof global !== 'undefined' ? global : this, function() {
11
- return /******/ (function(modules) { // webpackBootstrap
12
- /******/ // The module cache
13
- /******/ var installedModules = {};
14
- /******/
15
- /******/ // The require function
16
- /******/ function __webpack_require__(moduleId) {
17
- /******/
18
- /******/ // Check if module is in cache
19
- /******/ if(installedModules[moduleId]) {
20
- /******/ return installedModules[moduleId].exports;
21
- /******/ }
22
- /******/ // Create a new module (and put it into the cache)
23
- /******/ var module = installedModules[moduleId] = {
24
- /******/ i: moduleId,
25
- /******/ l: false,
26
- /******/ exports: {}
27
- /******/ };
28
- /******/
29
- /******/ // Execute the module function
30
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
- /******/
32
- /******/ // Flag the module as loaded
33
- /******/ module.l = true;
34
- /******/
35
- /******/ // Return the exports of the module
36
- /******/ return module.exports;
37
- /******/ }
38
- /******/
39
- /******/
40
- /******/ // expose the modules object (__webpack_modules__)
41
- /******/ __webpack_require__.m = modules;
42
- /******/
43
- /******/ // expose the module cache
44
- /******/ __webpack_require__.c = installedModules;
45
- /******/
46
- /******/ // define getter function for harmony exports
47
- /******/ __webpack_require__.d = function(exports, name, getter) {
48
- /******/ if(!__webpack_require__.o(exports, name)) {
49
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
50
- /******/ }
51
- /******/ };
52
- /******/
53
- /******/ // define __esModule on exports
54
- /******/ __webpack_require__.r = function(exports) {
55
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
56
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
57
- /******/ }
58
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
59
- /******/ };
60
- /******/
61
- /******/ // create a fake namespace object
62
- /******/ // mode & 1: value is a module id, require it
63
- /******/ // mode & 2: merge all properties of value into the ns
64
- /******/ // mode & 4: return value when already ns object
65
- /******/ // mode & 8|1: behave like require
66
- /******/ __webpack_require__.t = function(value, mode) {
67
- /******/ if(mode & 1) value = __webpack_require__(value);
68
- /******/ if(mode & 8) return value;
69
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
70
- /******/ var ns = Object.create(null);
71
- /******/ __webpack_require__.r(ns);
72
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
73
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
74
- /******/ return ns;
75
- /******/ };
76
- /******/
77
- /******/ // getDefaultExport function for compatibility with non-harmony modules
78
- /******/ __webpack_require__.n = function(module) {
79
- /******/ var getter = module && module.__esModule ?
80
- /******/ function getDefault() { return module['default']; } :
81
- /******/ function getModuleExports() { return module; };
82
- /******/ __webpack_require__.d(getter, 'a', getter);
83
- /******/ return getter;
84
- /******/ };
85
- /******/
86
- /******/ // Object.prototype.hasOwnProperty.call
87
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
88
- /******/
89
- /******/ // __webpack_public_path__
90
- /******/ __webpack_require__.p = "";
91
- /******/
92
- /******/
93
- /******/ // Load entry module and return exports
94
- /******/ return __webpack_require__(__webpack_require__.s = 0);
95
- /******/ })
96
- /************************************************************************/
97
- /******/ ([
11
+ return /******/ (function() { // webpackBootstrap
12
+ /******/ "use strict";
13
+ /******/ var __webpack_modules__ = ([
98
14
  /* 0 */
99
- /***/ (function(module, exports, __webpack_require__) {
15
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
100
16
 
101
- "use strict";
102
17
  /*jshint node:true */
103
18
  /*
104
19
 
@@ -147,9 +62,8 @@ module.exports.html = style_html;
147
62
 
148
63
  /***/ }),
149
64
  /* 1 */
150
- /***/ (function(module, exports, __webpack_require__) {
65
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
151
66
 
152
- "use strict";
153
67
  /*jshint node:true */
154
68
  /*
155
69
 
@@ -196,9 +110,8 @@ module.exports.defaultOptions = function() {
196
110
 
197
111
  /***/ }),
198
112
  /* 2 */
199
- /***/ (function(module, exports, __webpack_require__) {
113
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
200
114
 
201
- "use strict";
202
115
  /*jshint node:true */
203
116
  /*
204
117
 
@@ -1662,9 +1575,8 @@ module.exports.Beautifier = Beautifier;
1662
1575
 
1663
1576
  /***/ }),
1664
1577
  /* 3 */
1665
- /***/ (function(module, exports, __webpack_require__) {
1578
+ /***/ (function(module) {
1666
1579
 
1667
- "use strict";
1668
1580
  /*jshint node:true */
1669
1581
  /*
1670
1582
  The MIT License (MIT)
@@ -2088,9 +2000,8 @@ module.exports.Output = Output;
2088
2000
 
2089
2001
  /***/ }),
2090
2002
  /* 4 */
2091
- /***/ (function(module, exports, __webpack_require__) {
2003
+ /***/ (function(module) {
2092
2004
 
2093
- "use strict";
2094
2005
  /*jshint node:true */
2095
2006
  /*
2096
2007
 
@@ -2149,9 +2060,8 @@ module.exports.Token = Token;
2149
2060
 
2150
2061
  /***/ }),
2151
2062
  /* 5 */
2152
- /***/ (function(module, exports, __webpack_require__) {
2063
+ /***/ (function(__unused_webpack_module, exports) {
2153
2064
 
2154
- "use strict";
2155
2065
  /* jshint node: true, curly: false */
2156
2066
  // Parts of this section of code is taken from acorn.
2157
2067
  //
@@ -2213,9 +2123,8 @@ exports.allLineBreaks = new RegExp(exports.lineBreak.source, 'g');
2213
2123
 
2214
2124
  /***/ }),
2215
2125
  /* 6 */
2216
- /***/ (function(module, exports, __webpack_require__) {
2126
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2217
2127
 
2218
- "use strict";
2219
2128
  /*jshint node:true */
2220
2129
  /*
2221
2130
 
@@ -2313,9 +2222,8 @@ module.exports.Options = Options;
2313
2222
 
2314
2223
  /***/ }),
2315
2224
  /* 7 */
2316
- /***/ (function(module, exports, __webpack_require__) {
2225
+ /***/ (function(module) {
2317
2226
 
2318
- "use strict";
2319
2227
  /*jshint node:true */
2320
2228
  /*
2321
2229
 
@@ -2513,9 +2421,8 @@ module.exports.mergeOpts = _mergeOpts;
2513
2421
 
2514
2422
  /***/ }),
2515
2423
  /* 8 */
2516
- /***/ (function(module, exports, __webpack_require__) {
2424
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2517
2425
 
2518
- "use strict";
2519
2426
  /*jshint node:true */
2520
2427
  /*
2521
2428
 
@@ -2584,7 +2491,7 @@ var TOKEN = {
2584
2491
 
2585
2492
  var directives_core = new Directives(/\/\*/, /\*\//);
2586
2493
 
2587
- var number_pattern = /0[xX][0123456789abcdefABCDEF]*|0[oO][01234567]*|0[bB][01]*|\d+n|(?:\.\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?/;
2494
+ var number_pattern = /0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/;
2588
2495
 
2589
2496
  var digit = /[0-9]/;
2590
2497
 
@@ -3086,9 +2993,8 @@ module.exports.line_starters = line_starters.slice();
3086
2993
 
3087
2994
  /***/ }),
3088
2995
  /* 9 */
3089
- /***/ (function(module, exports, __webpack_require__) {
2996
+ /***/ (function(module) {
3090
2997
 
3091
- "use strict";
3092
2998
  /*jshint node:true */
3093
2999
  /*
3094
3000
 
@@ -3285,9 +3191,8 @@ module.exports.InputScanner = InputScanner;
3285
3191
 
3286
3192
  /***/ }),
3287
3193
  /* 10 */
3288
- /***/ (function(module, exports, __webpack_require__) {
3194
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3289
3195
 
3290
- "use strict";
3291
3196
  /*jshint node:true */
3292
3197
  /*
3293
3198
 
@@ -3432,9 +3337,8 @@ module.exports.TOKEN = TOKEN;
3432
3337
 
3433
3338
  /***/ }),
3434
3339
  /* 11 */
3435
- /***/ (function(module, exports, __webpack_require__) {
3340
+ /***/ (function(module) {
3436
3341
 
3437
- "use strict";
3438
3342
  /*jshint node:true */
3439
3343
  /*
3440
3344
 
@@ -3517,9 +3421,8 @@ module.exports.TokenStream = TokenStream;
3517
3421
 
3518
3422
  /***/ }),
3519
3423
  /* 12 */
3520
- /***/ (function(module, exports, __webpack_require__) {
3424
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3521
3425
 
3522
- "use strict";
3523
3426
  /*jshint node:true */
3524
3427
  /*
3525
3428
 
@@ -3629,9 +3532,8 @@ module.exports.WhitespacePattern = WhitespacePattern;
3629
3532
 
3630
3533
  /***/ }),
3631
3534
  /* 13 */
3632
- /***/ (function(module, exports, __webpack_require__) {
3535
+ /***/ (function(module) {
3633
3536
 
3634
- "use strict";
3635
3537
  /*jshint node:true */
3636
3538
  /*
3637
3539
 
@@ -3730,9 +3632,8 @@ module.exports.Pattern = Pattern;
3730
3632
 
3731
3633
  /***/ }),
3732
3634
  /* 14 */
3733
- /***/ (function(module, exports, __webpack_require__) {
3635
+ /***/ (function(module) {
3734
3636
 
3735
- "use strict";
3736
3637
  /*jshint node:true */
3737
3638
  /*
3738
3639
 
@@ -3799,9 +3700,8 @@ module.exports.Directives = Directives;
3799
3700
 
3800
3701
  /***/ }),
3801
3702
  /* 15 */
3802
- /***/ (function(module, exports, __webpack_require__) {
3703
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3803
3704
 
3804
- "use strict";
3805
3705
  /*jshint node:true */
3806
3706
  /*
3807
3707
 
@@ -4017,9 +3917,8 @@ module.exports.TemplatablePattern = TemplatablePattern;
4017
3917
 
4018
3918
  /***/ }),
4019
3919
  /* 16 */
4020
- /***/ (function(module, exports, __webpack_require__) {
3920
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4021
3921
 
4022
- "use strict";
4023
3922
  /*jshint node:true */
4024
3923
  /*
4025
3924
 
@@ -4066,9 +3965,8 @@ module.exports.defaultOptions = function() {
4066
3965
 
4067
3966
  /***/ }),
4068
3967
  /* 17 */
4069
- /***/ (function(module, exports, __webpack_require__) {
3968
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4070
3969
 
4071
- "use strict";
4072
3970
  /*jshint node:true */
4073
3971
  /*
4074
3972
 
@@ -4504,7 +4402,7 @@ Beautifier.prototype.beautify = function() {
4504
4402
  } else if (this._ch === ',') {
4505
4403
  this.print_string(this._ch);
4506
4404
  this.eatWhitespace(true);
4507
- if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel === 0 && !insideAtImport) {
4405
+ if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel === 0 && !insideAtImport && !insideAtExtend) {
4508
4406
  this._output.add_new_line();
4509
4407
  } else {
4510
4408
  this._output.space_before_token = true;
@@ -4553,9 +4451,8 @@ module.exports.Beautifier = Beautifier;
4553
4451
 
4554
4452
  /***/ }),
4555
4453
  /* 18 */
4556
- /***/ (function(module, exports, __webpack_require__) {
4454
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4557
4455
 
4558
- "use strict";
4559
4456
  /*jshint node:true */
4560
4457
  /*
4561
4458
 
@@ -4616,9 +4513,8 @@ module.exports.Options = Options;
4616
4513
 
4617
4514
  /***/ }),
4618
4515
  /* 19 */
4619
- /***/ (function(module, exports, __webpack_require__) {
4516
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4620
4517
 
4621
- "use strict";
4622
4518
  /*jshint node:true */
4623
4519
  /*
4624
4520
 
@@ -4665,9 +4561,8 @@ module.exports.defaultOptions = function() {
4665
4561
 
4666
4562
  /***/ }),
4667
4563
  /* 20 */
4668
- /***/ (function(module, exports, __webpack_require__) {
4564
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4669
4565
 
4670
- "use strict";
4671
4566
  /*jshint node:true */
4672
4567
  /*
4673
4568
 
@@ -5537,9 +5432,8 @@ module.exports.Beautifier = Beautifier;
5537
5432
 
5538
5433
  /***/ }),
5539
5434
  /* 21 */
5540
- /***/ (function(module, exports, __webpack_require__) {
5435
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
5541
5436
 
5542
- "use strict";
5543
5437
  /*jshint node:true */
5544
5438
  /*
5545
5439
 
@@ -5635,9 +5529,8 @@ module.exports.Options = Options;
5635
5529
 
5636
5530
  /***/ }),
5637
5531
  /* 22 */
5638
- /***/ (function(module, exports, __webpack_require__) {
5532
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
5639
5533
 
5640
- "use strict";
5641
5534
  /*jshint node:true */
5642
5535
  /*
5643
5536
 
@@ -5973,6 +5866,41 @@ module.exports.TOKEN = TOKEN;
5973
5866
 
5974
5867
 
5975
5868
  /***/ })
5976
- /******/ ]);
5869
+ /******/ ]);
5870
+ /************************************************************************/
5871
+ /******/ // The module cache
5872
+ /******/ var __webpack_module_cache__ = {};
5873
+ /******/
5874
+ /******/ // The require function
5875
+ /******/ function __webpack_require__(moduleId) {
5876
+ /******/ // Check if module is in cache
5877
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
5878
+ /******/ if (cachedModule !== undefined) {
5879
+ /******/ return cachedModule.exports;
5880
+ /******/ }
5881
+ /******/ // Create a new module (and put it into the cache)
5882
+ /******/ var module = __webpack_module_cache__[moduleId] = {
5883
+ /******/ // no module.id needed
5884
+ /******/ // no module.loaded needed
5885
+ /******/ exports: {}
5886
+ /******/ };
5887
+ /******/
5888
+ /******/ // Execute the module function
5889
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
5890
+ /******/
5891
+ /******/ // Return the exports of the module
5892
+ /******/ return module.exports;
5893
+ /******/ }
5894
+ /******/
5895
+ /************************************************************************/
5896
+ /******/
5897
+ /******/ // startup
5898
+ /******/ // Load entry module and return exports
5899
+ /******/ // This entry module used 'module' so it can't be inlined
5900
+ /******/ var __webpack_exports__ = __webpack_require__(0);
5901
+ /******/
5902
+ /******/ return __webpack_exports__;
5903
+ /******/ })()
5904
+ ;
5977
5905
  });
5978
5906
  //# sourceMappingURL=beautifier.js.map