@jdeighan/coffee-utils 10.0.5 → 10.0.6
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/package.json +1 -1
- package/src/coffee_utils.coffee +7 -0
- package/src/coffee_utils.js +5 -0
package/package.json
CHANGED
package/src/coffee_utils.coffee
CHANGED
@@ -21,6 +21,13 @@ export isComment = (line) ->
|
|
21
21
|
|
22
22
|
# ---------------------------------------------------------------------------
|
23
23
|
|
24
|
+
export isSubclassOf = (subClass, superClass) ->
|
25
|
+
|
26
|
+
return (subClass == superClass) \
|
27
|
+
|| (subClass.prototype instanceof superClass)
|
28
|
+
|
29
|
+
# ---------------------------------------------------------------------------
|
30
|
+
|
24
31
|
export eval_expr = (str) ->
|
25
32
|
|
26
33
|
str = str.replace(/\bundef\b/g, 'undefined')
|
package/src/coffee_utils.js
CHANGED
@@ -27,6 +27,11 @@ export var isComment = function(line) {
|
|
27
27
|
return defined(lMatches);
|
28
28
|
};
|
29
29
|
|
30
|
+
// ---------------------------------------------------------------------------
|
31
|
+
export var isSubclassOf = function(subClass, superClass) {
|
32
|
+
return (subClass === superClass) || (subClass.prototype instanceof superClass);
|
33
|
+
};
|
34
|
+
|
30
35
|
// ---------------------------------------------------------------------------
|
31
36
|
export var eval_expr = function(str) {
|
32
37
|
str = str.replace(/\bundef\b/g, 'undefined');
|