-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpatch.diff
More file actions
40 lines (38 loc) · 1.37 KB
/
patch.diff
File metadata and controls
40 lines (38 loc) · 1.37 KB
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
36
37
38
39
40
--- "a/node_modules/javascript-lp-solver/src/main.js"
+++ "b/node_modules/javascript-lp-solver/src/main.js"
@@ -25,7 +25,7 @@ var Constraint = expressions.Constraint;
var Variable = expressions.Variable;
var Numeral = expressions.Numeral;
var Term = expressions.Term;
-var External = require("./External/main.js");
+var External = {};
// Place everything under the Solver Name Space
var Solver = function () {
@@ -231,16 +231,21 @@ var Solver = function () {
// var define = define || undefined;
// var window = window || undefined;
+var exports = {
+ __esModule: { value: true },
+ default: new Solver()
+};
+
// If the project is loading through require.js, use `define` and exit
if (typeof define === "function") {
define([], function () {
- return new Solver();
+ return exports;
});
-// If the project doesn't see define, but sees window, put solver on window
-} else if (typeof window === "object"){
- window.solver = new Solver();
-} else if (typeof self === "object"){
- self.solver = new Solver();
+ // If the project doesn't see define, but sees window, put solver on window
+} else if (typeof window === "object") {
+ window.solver = exports.Solver;
+} else if (typeof self === "object") {
+ self.solver = exports.Solver;
}
// Ensure that its available in node.js env
-module.exports = new Solver();
+module.exports = exports;