easy-with-style 3.0.153 → 3.0.157
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/example.js +1236 -498
- package/lib/utilities/class.js +10 -11
- package/package.json +3 -3
- package/src/utilities/class.js +3 -13
package/lib/utilities/class.js
CHANGED
|
@@ -9,20 +9,19 @@ Object.defineProperty(exports, "isClass", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
var _easy = require("easy");
|
|
12
|
+
function _instanceof(left, right) {
|
|
13
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
14
|
+
return !!right[Symbol.hasInstance](left);
|
|
15
|
+
} else {
|
|
16
|
+
return left instanceof right;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
12
19
|
function isClass(argument) {
|
|
13
20
|
return isSubclassOf(argument, _easy.Element);
|
|
14
21
|
} ///
|
|
15
22
|
function isSubclassOf(argument, Class) {
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
subclass = true;
|
|
19
|
-
} else {
|
|
20
|
-
argument = Object.getPrototypeOf(argument); ///
|
|
21
|
-
if (argument !== null) {
|
|
22
|
-
subclass = isSubclassOf(argument, Class);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return subclass;
|
|
23
|
+
var subclassOf = _instanceof(argument.prototype, Class);
|
|
24
|
+
return subclassOf;
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsaXRpZXMvY2xhc3MuanMiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG5pbXBvcnQgeyBFbGVtZW50IH0gZnJvbSBcImVhc3lcIjtcblxuZXhwb3J0IGZ1bmN0aW9uIGlzQ2xhc3MoYXJndW1lbnQpIHsgcmV0dXJuIGlzU3ViY2xhc3NPZihhcmd1bWVudCwgRWxlbWVudCk7IH0gIC8vL1xuXG5mdW5jdGlvbiBpc1N1YmNsYXNzT2YoYXJndW1lbnQsIENsYXNzKSB7XG4gIGNvbnN0IHN1YmNsYXNzT2YgPSAoYXJndW1lbnQucHJvdG90eXBlIGluc3RhbmNlb2YgQ2xhc3MpO1xuXG4gIHJldHVybiBzdWJjbGFzc09mO1xufVxuIl0sIm5hbWVzIjpbImlzQ2xhc3MiLCJhcmd1bWVudCIsImlzU3ViY2xhc3NPZiIsIkVsZW1lbnQiLCJDbGFzcyIsInN1YmNsYXNzT2YiLCJwcm90b3R5cGUiXSwibWFwcGluZ3MiOiJBQUFBLFlBQVksQ0FBQzs7OzsrQkFJR0EsU0FBTzs7O2VBQVBBLE9BQU87OztvQkFGQyxNQUFNOzs7Ozs7OztBQUV2QixTQUFTQSxPQUFPLENBQUNDLFFBQVEsRUFBRTtJQUFFLE9BQU9DLFlBQVksQ0FBQ0QsUUFBUSxFQUFFRSxLQUFPLFFBQUEsQ0FBQyxDQUFDO0NBQUUsQ0FBRSxHQUFHO0FBRWxGLFNBQVNELFlBQVksQ0FBQ0QsUUFBUSxFQUFFRyxLQUFLLEVBQUU7SUFDckMsSUFBTUMsVUFBVSxHQUFJSixBQUFrQixXQUFZRyxDQUE5QkgsUUFBUSxDQUFDSyxTQUFTLEVBQVlGLEtBQUssQ0FBQSxBQUFDLEFBQUM7SUFFekQsT0FBT0MsVUFBVSxDQUFDO0NBQ25CIn0=
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easy-with-style",
|
|
3
3
|
"author": "James Smith",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.157",
|
|
5
5
|
"license": "MIT, Anti-996",
|
|
6
6
|
"homepage": "https://github.com/djalbat/easy-with-style",
|
|
7
7
|
"description": "Programmatic styles for Easy.",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"url": "https://github.com/djalbat/easy-with-style"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"easy": "^13.0.
|
|
14
|
-
"with-style": "^5.0.
|
|
13
|
+
"easy": "^13.0.44",
|
|
14
|
+
"with-style": "^5.0.114"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@swc/core": "^1.2.50",
|
package/src/utilities/class.js
CHANGED
|
@@ -5,17 +5,7 @@ import { Element } from "easy";
|
|
|
5
5
|
export function isClass(argument) { return isSubclassOf(argument, Element); } ///
|
|
6
6
|
|
|
7
7
|
function isSubclassOf(argument, Class) {
|
|
8
|
-
|
|
8
|
+
const subclassOf = (argument.prototype instanceof Class);
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} else {
|
|
13
|
-
argument = Object.getPrototypeOf(argument); ///
|
|
14
|
-
|
|
15
|
-
if (argument !== null) {
|
|
16
|
-
subclass = isSubclassOf(argument, Class);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return subclass;
|
|
21
|
-
}
|
|
10
|
+
return subclassOf;
|
|
11
|
+
}
|