We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0bce8fe commit 806140dCopy full SHA for 806140d
1 file changed
isType.mjs.js
@@ -147,12 +147,10 @@ function is(value){
147
for(const propName in new TypeTest()){
148
// For each descriptor name:
149
150
- // Add a getter to the `is` function that returns the name of the descriptor.
151
- // This allows you to do `is(val).all(is.number, is.object)` instead of `is(val).all('number', 'object')`.
+ // Add an enumerable property to the `is` function.
152
Object.defineProperty(is, propName, {
153
- get: function(){ return propName; },
+ value: propName,
154
enumerable: true,
155
- configurable: true,
156
});
157
}
158
0 commit comments