@jdeighan/coffee-utils 10.0.12 → 10.0.13

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jdeighan/coffee-utils",
3
3
  "type": "module",
4
- "version": "10.0.12",
4
+ "version": "10.0.13",
5
5
  "description": "A set of utility functions for CoffeeScript",
6
6
  "main": "coffee_utils.js",
7
7
  "exports": {
@@ -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
@@ -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;