Skip to content

Commit 80061fd

Browse files
committed
eslint --fix
1 parent c1c374f commit 80061fd

39 files changed

+909
-439
lines changed

examples/PacktDataStructuresAlgorithms.min.js

Lines changed: 473 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/chapter01_02/lib/17-Book.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
(function (global, factory) {
2-
if (typeof define === "function" && define.amd) {
3-
define(["module", "exports"], factory);
4-
} else if (typeof exports !== "undefined") {
2+
if (typeof define === 'function' && define.amd) {
3+
define(['module', 'exports'], factory);
4+
} else if (typeof exports !== 'undefined') {
55
factory(module, exports);
66
} else {
7-
var mod = {
7+
const mod = {
88
exports: {}
99
};
1010
factory(mod, mod.exports);
1111
global.Book = mod.exports;
1212
}
13-
})(this, function (module, exports) {
14-
"use strict";
13+
}(this, (module, exports) => {
1514

16-
Object.defineProperty(exports, "__esModule", {
15+
16+
Object.defineProperty(exports, '__esModule', {
1717
value: true
1818
});
1919

2020
function _classCallCheck(instance, Constructor) {
2121
if (!(instance instanceof Constructor)) {
22-
throw new TypeError("Cannot call a class as a function");
22+
throw new TypeError('Cannot call a class as a function');
2323
}
2424
}
2525

26-
var _createClass = function () {
26+
const _createClass = (function () {
2727
function defineProperties(target, props) {
28-
for (var i = 0; i < props.length; i++) {
29-
var descriptor = props[i];
28+
for (let i = 0; i < props.length; i++) {
29+
const descriptor = props[i];
3030
descriptor.enumerable = descriptor.enumerable || false;
3131
descriptor.configurable = true;
32-
if ("value" in descriptor) descriptor.writable = true;
32+
if ('value' in descriptor) descriptor.writable = true;
3333
Object.defineProperty(target, descriptor.key, descriptor);
3434
}
3535
}
@@ -39,25 +39,25 @@
3939
if (staticProps) defineProperties(Constructor, staticProps);
4040
return Constructor;
4141
};
42-
}();
42+
}());
4343

44-
var Book = function () {
44+
const Book = (function () {
4545
function Book(title) {
4646
_classCallCheck(this, Book);
4747

4848
this.title = title;
4949
}
5050

5151
_createClass(Book, [{
52-
key: "printTitle",
52+
key: 'printTitle',
5353
value: function printTitle() {
5454
console.log(this.title);
5555
}
5656
}]);
5757

5858
return Book;
59-
}();
59+
}());
6060

6161
exports.default = Book;
62-
module.exports = exports["default"];
63-
});
62+
module.exports = exports.default;
63+
}));
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
(function (global, factory) {
2-
if (typeof define === "function" && define.amd) {
3-
define(["exports"], factory);
4-
} else if (typeof exports !== "undefined") {
2+
if (typeof define === 'function' && define.amd) {
3+
define(['exports'], factory);
4+
} else if (typeof exports !== 'undefined') {
55
factory(exports);
66
} else {
7-
var mod = {
7+
const mod = {
88
exports: {}
99
};
1010
factory(mod.exports);
1111
global.CalcArea = mod.exports;
1212
}
13-
})(this, function (exports) {
14-
"use strict";
13+
}(this, (exports) => {
1514

16-
Object.defineProperty(exports, "__esModule", {
15+
16+
Object.defineProperty(exports, '__esModule', {
1717
value: true
1818
});
19-
var circleArea = exports.circleArea = function circleArea(r) {
19+
const circleArea = exports.circleArea = function circleArea(r) {
2020
return 3.14 * Math.pow(r, 2);
2121
};
2222

23-
var squareArea = exports.squareArea = function squareArea(s) {
23+
const squareArea = exports.squareArea = function squareArea(s) {
2424
return s * s;
2525
};
2626

2727
// export { circleArea, squareArea }; // {1}
2828
exports.circle = circleArea;
2929
exports.square = squareArea;
30-
});
30+
}));

0 commit comments

Comments
 (0)