jonschlinkert / kind-of

Get the native JavaScript type of a value, fast. Used by superstruct, micromatch and many others!
https://github.com/jonschlnkert
MIT License
347 stars 38 forks source link

Date is undefined #23

Closed dzdidi closed 6 years ago

dzdidi commented 6 years ago
<my package>/node_modules/nyc/node_modules/test-exclude/node_modules/kind-of/index.js:82
  if (val instanceof Date) return true;
                     ^

ReferenceError: Date is not defined

node version: v7.10.1 npm version: 4.2.0 container image: phusion/baseimage

x instanceof Date works in the node console within the same container

jonschlinkert commented 6 years ago

Given that Date was added in the very first version of ECMAScript, I'm assuming this is a bug related to the tool you're using. Closing since you didn't provide enough information to come to a different conclusion, but feel free to reopen if you can provide enough detail for anyone else to reproduce the bug.