@jdeighan/coffee-utils 10.0.12 → 10.0.13
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 +6 -0
- package/src/coffee_utils.js +5 -0
package/package.json
CHANGED
package/src/coffee_utils.coffee
CHANGED
@@ -61,6 +61,12 @@ export charCount = (str, ch) ->
|
|
61
61
|
|
62
62
|
# ---------------------------------------------------------------------------
|
63
63
|
|
64
|
+
export oneof = (word, lWords...) ->
|
65
|
+
|
66
|
+
return (lWords.indexOf(word) >= 0)
|
67
|
+
|
68
|
+
# ---------------------------------------------------------------------------
|
69
|
+
|
64
70
|
export isConstructor = (f) ->
|
65
71
|
|
66
72
|
try
|
package/src/coffee_utils.js
CHANGED
@@ -65,6 +65,11 @@ export var charCount = function(str, ch) {
|
|
65
65
|
return count;
|
66
66
|
};
|
67
67
|
|
68
|
+
// ---------------------------------------------------------------------------
|
69
|
+
export var oneof = function(word, ...lWords) {
|
70
|
+
return lWords.indexOf(word) >= 0;
|
71
|
+
};
|
72
|
+
|
68
73
|
// ---------------------------------------------------------------------------
|
69
74
|
export var isConstructor = function(f) {
|
70
75
|
var err;
|