summaryrefslogtreecommitdiff
path: root/chromium/third_party/devtools-frontend/src/node_modules/is-date-object
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-03-11 11:32:04 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-03-18 13:40:17 +0000
commit31ccca0778db85c159634478b4ec7997f6704860 (patch)
tree3d33fc3afd9d5ec95541e1bbe074a9cf8da12a0e /chromium/third_party/devtools-frontend/src/node_modules/is-date-object
parent248b70b82a40964d5594eb04feca0fa36716185d (diff)
downloadqtwebengine-chromium-31ccca0778db85c159634478b4ec7997f6704860.tar.gz
BASELINE: Update Chromium to 80.0.3987.136
Change-Id: I98e1649aafae85ba3a83e67af00bb27ef301db7b Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'chromium/third_party/devtools-frontend/src/node_modules/is-date-object')
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/is-date-object/.eslintrc9
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/is-date-object/.jscs.json122
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/is-date-object/.npmignore28
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/is-date-object/.travis.yml58
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/is-date-object/CHANGELOG.md10
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/is-date-object/LICENSE22
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/is-date-object/Makefile61
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/is-date-object/README.md53
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/is-date-object/index.js20
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/is-date-object/package.json62
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/is-date-object/test.js33
11 files changed, 478 insertions, 0 deletions
diff --git a/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/.eslintrc b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/.eslintrc
new file mode 100644
index 00000000000..1228f975c99
--- /dev/null
+++ b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/.eslintrc
@@ -0,0 +1,9 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "rules": {
+ "max-statements": [2, 12]
+ }
+}
diff --git a/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/.jscs.json b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/.jscs.json
new file mode 100644
index 00000000000..040bb6806a5
--- /dev/null
+++ b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/.jscs.json
@@ -0,0 +1,122 @@
+{
+ "es3": true,
+
+ "additionalRules": [],
+
+ "requireSemicolons": true,
+
+ "disallowMultipleSpaces": true,
+
+ "disallowIdentifierNames": [],
+
+ "requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"],
+
+ "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
+
+ "disallowSpaceAfterKeywords": [],
+
+ "disallowSpaceBeforeComma": true,
+ "disallowSpaceBeforeSemicolon": true,
+
+ "disallowNodeTypes": [
+ "DebuggerStatement",
+ "ForInStatement",
+ "LabeledStatement",
+ "SwitchCase",
+ "SwitchStatement",
+ "WithStatement"
+ ],
+
+ "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
+ "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
+ "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
+
+ "requireSpaceBetweenArguments": true,
+
+ "disallowSpacesInsideParentheses": true,
+
+ "disallowSpacesInsideArrayBrackets": true,
+
+ "disallowQuotedKeysInObjects": "allButReserved",
+
+ "disallowSpaceAfterObjectKeys": true,
+
+ "requireCommaBeforeLineBreak": true,
+
+ "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
+ "requireSpaceAfterPrefixUnaryOperators": [],
+
+ "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
+ "requireSpaceBeforePostfixUnaryOperators": [],
+
+ "disallowSpaceBeforeBinaryOperators": [],
+ "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+
+ "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+ "disallowSpaceAfterBinaryOperators": [],
+
+ "disallowImplicitTypeConversion": ["binary", "string"],
+
+ "disallowKeywords": ["with", "eval"],
+
+ "requireKeywordsOnNewLine": [],
+ "disallowKeywordsOnNewLine": ["else"],
+
+ "requireLineFeedAtFileEnd": true,
+
+ "disallowTrailingWhitespace": true,
+
+ "disallowTrailingComma": true,
+
+ "excludeFiles": ["node_modules/**", "vendor/**"],
+
+ "disallowMultipleLineStrings": true,
+
+ "requireDotNotation": true,
+
+ "requireParenthesesAroundIIFE": true,
+
+ "validateLineBreaks": "LF",
+
+ "validateQuoteMarks": {
+ "escape": true,
+ "mark": "'"
+ },
+
+ "disallowOperatorBeforeLineBreak": [],
+
+ "requireSpaceBeforeKeywords": [
+ "do",
+ "for",
+ "if",
+ "else",
+ "switch",
+ "case",
+ "try",
+ "catch",
+ "finally",
+ "while",
+ "with",
+ "return"
+ ],
+
+ "validateAlignedFunctionParameters": {
+ "lineBreakAfterOpeningBraces": true,
+ "lineBreakBeforeClosingBraces": true
+ },
+
+ "requirePaddingNewLinesBeforeExport": true,
+
+ "validateNewlineAfterArrayElements": {
+ "maximum": 1
+ },
+
+ "requirePaddingNewLinesAfterUseStrict": true,
+
+ "disallowArrowFunctions": true,
+
+ "validateOrderInObjectKeys": "asc-insensitive"
+}
+
diff --git a/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/.npmignore b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/.npmignore
new file mode 100644
index 00000000000..59d842baa84
--- /dev/null
+++ b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/.npmignore
@@ -0,0 +1,28 @@
+# Logs
+logs
+*.log
+
+# Runtime data
+pids
+*.pid
+*.seed
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Compiled binary addons (http://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directory
+# Commenting this out is preferred by some people, see
+# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
+node_modules
+
+# Users Environment Variables
+.lock-wscript
diff --git a/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/.travis.yml b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/.travis.yml
new file mode 100644
index 00000000000..4c29ed58ba7
--- /dev/null
+++ b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/.travis.yml
@@ -0,0 +1,58 @@
+language: node_js
+node_js:
+ - "4.1"
+ - "4.0"
+ - "iojs-v3.3"
+ - "iojs-v3.2"
+ - "iojs-v3.1"
+ - "iojs-v3.0"
+ - "iojs-v2.5"
+ - "iojs-v2.4"
+ - "iojs-v2.3"
+ - "iojs-v2.2"
+ - "iojs-v2.1"
+ - "iojs-v2.0"
+ - "iojs-v1.8"
+ - "iojs-v1.7"
+ - "iojs-v1.6"
+ - "iojs-v1.5"
+ - "iojs-v1.4"
+ - "iojs-v1.3"
+ - "iojs-v1.2"
+ - "iojs-v1.1"
+ - "iojs-v1.0"
+ - "0.12"
+ - "0.11"
+ - "0.10"
+ - "0.9"
+ - "0.8"
+ - "0.6"
+ - "0.4"
+before_install:
+ - '[ "${TRAVIS_NODE_VERSION}" = "0.6" ] || npm install -g npm@1.4.28 && npm install -g npm'
+sudo: false
+matrix:
+ fast_finish: true
+ allow_failures:
+ - node_js: "4.0"
+ - node_js: "iojs-v3.2"
+ - node_js: "iojs-v3.1"
+ - node_js: "iojs-v3.0"
+ - node_js: "iojs-v2.4"
+ - node_js: "iojs-v2.3"
+ - node_js: "iojs-v2.2"
+ - node_js: "iojs-v2.1"
+ - node_js: "iojs-v2.0"
+ - node_js: "iojs-v1.7"
+ - node_js: "iojs-v1.6"
+ - node_js: "iojs-v1.5"
+ - node_js: "iojs-v1.4"
+ - node_js: "iojs-v1.3"
+ - node_js: "iojs-v1.2"
+ - node_js: "iojs-v1.1"
+ - node_js: "iojs-v1.0"
+ - node_js: "0.11"
+ - node_js: "0.9"
+ - node_js: "0.8"
+ - node_js: "0.6"
+ - node_js: "0.4"
diff --git a/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/CHANGELOG.md b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/CHANGELOG.md
new file mode 100644
index 00000000000..4a7eab61bb1
--- /dev/null
+++ b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/CHANGELOG.md
@@ -0,0 +1,10 @@
+1.0.1 / 2015-09-27
+=================
+ * [Fix] If `@@toStringTag` is not present, use the old-school `Object#toString` test
+ * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG
+ * [Dev Deps] update `is`, `eslint`, `@ljharb/eslint-config`, `semver`, `tape`, `jscs`, `nsp`, `covert`
+ * [Tests] up to `io.js` `v3.3`, `node` `v4.1`
+
+1.0.0 / 2015-01-28
+=================
+ * Initial release.
diff --git a/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/LICENSE b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/LICENSE
new file mode 100644
index 00000000000..b43df444e51
--- /dev/null
+++ b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Jordan Harband
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/Makefile b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/Makefile
new file mode 100644
index 00000000000..b9e4fe1aab3
--- /dev/null
+++ b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/Makefile
@@ -0,0 +1,61 @@
+# Since we rely on paths relative to the makefile location, abort if make isn't being run from there.
+$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in))
+
+ # The files that need updating when incrementing the version number.
+VERSIONED_FILES := *.js *.json README*
+
+
+# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly.
+# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment
+# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests.
+export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH")
+UTILS := semver
+# Make sure that all required utilities can be located.
+UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS)))
+
+# Default target (by virtue of being the first non '.'-prefixed in the file).
+.PHONY: _no-target-specified
+_no-target-specified:
+ $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests)
+
+# Lists all targets defined in this makefile.
+.PHONY: list
+list:
+ @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort
+
+# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS).
+.PHONY: test
+test:
+ @npm test
+
+.PHONY: _ensure-tag
+_ensure-tag:
+ifndef TAG
+ $(error Please invoke with `make TAG=<new-version> release`, where <new-version> is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number)
+endif
+
+CHANGELOG_ERROR = $(error No CHANGELOG specified)
+.PHONY: _ensure-changelog
+_ensure-changelog:
+ @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2)
+
+# Ensures that the git workspace is clean.
+.PHONY: _ensure-clean
+_ensure-clean:
+ @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; }
+
+# Makes a release; invoke with `make TAG=<versionOrIncrementSpec> release`.
+.PHONY: release
+release: _ensure-tag _ensure-changelog _ensure-clean
+ @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \
+ new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \
+ if printf "$$new_ver" | command grep -q '^[0-9]'; then \
+ semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \
+ semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \
+ else \
+ new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \
+ fi; \
+ printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \
+ replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \
+ git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \
+ git tag -a -m "v$$new_ver" "v$$new_ver"
diff --git a/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/README.md b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/README.md
new file mode 100644
index 00000000000..55b0c59673e
--- /dev/null
+++ b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/README.md
@@ -0,0 +1,53 @@
+# is-date-object <sup>[![Version Badge][2]][1]</sup>
+
+[![Build Status][3]][4]
+[![dependency status][5]][6]
+[![dev dependency status][7]][8]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+
+[![npm badge][11]][1]
+
+[![browser support][9]][10]
+
+Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
+
+## Example
+
+```js
+var isDate = require('is-date-object');
+var assert = require('assert');
+
+assert.notOk(isDate(undefined));
+assert.notOk(isDate(null));
+assert.notOk(isDate(false));
+assert.notOk(isDate(true));
+assert.notOk(isDate(42));
+assert.notOk(isDate('foo'));
+assert.notOk(isDate(function () {}));
+assert.notOk(isDate([]));
+assert.notOk(isDate({}));
+assert.notOk(isDate(/a/g));
+assert.notOk(isDate(new RegExp('a', 'g')));
+
+assert.ok(isDate(new Date()));
+```
+
+## Tests
+Simply clone the repo, `npm install`, and run `npm test`
+
+[1]: https://npmjs.org/package/is-date-object
+[2]: http://versionbadg.es/ljharb/is-date-object.svg
+[3]: https://travis-ci.org/ljharb/is-date-object.svg
+[4]: https://travis-ci.org/ljharb/is-date-object
+[5]: https://david-dm.org/ljharb/is-date-object.svg
+[6]: https://david-dm.org/ljharb/is-date-object
+[7]: https://david-dm.org/ljharb/is-date-object/dev-status.svg
+[8]: https://david-dm.org/ljharb/is-date-object#info=devDependencies
+[9]: https://ci.testling.com/ljharb/is-date-object.png
+[10]: https://ci.testling.com/ljharb/is-date-object
+[11]: https://nodei.co/npm/is-date-object.png?downloads=true&stars=true
+[license-image]: http://img.shields.io/npm/l/is-date-object.svg
+[license-url]: LICENSE
+[downloads-image]: http://img.shields.io/npm/dm/is-date-object.svg
+[downloads-url]: http://npm-stat.com/charts.html?package=is-date-object
diff --git a/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/index.js b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/index.js
new file mode 100644
index 00000000000..fe0d7ecd7c1
--- /dev/null
+++ b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/index.js
@@ -0,0 +1,20 @@
+'use strict';
+
+var getDay = Date.prototype.getDay;
+var tryDateObject = function tryDateObject(value) {
+ try {
+ getDay.call(value);
+ return true;
+ } catch (e) {
+ return false;
+ }
+};
+
+var toStr = Object.prototype.toString;
+var dateClass = '[object Date]';
+var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
+
+module.exports = function isDateObject(value) {
+ if (typeof value !== 'object' || value === null) { return false; }
+ return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;
+};
diff --git a/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/package.json b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/package.json
new file mode 100644
index 00000000000..04fc9daac40
--- /dev/null
+++ b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/package.json
@@ -0,0 +1,62 @@
+{
+ "author": "Jordan Harband",
+ "dependencies": {},
+ "description": "Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.",
+ "devDependencies": {
+ "@ljharb/eslint-config": "^1.2.0",
+ "covert": "^1.1.0",
+ "eslint": "^1.5.1",
+ "foreach": "^2.0.5",
+ "indexof": "^0.0.1",
+ "is": "^3.1.0",
+ "jscs": "^2.1.1",
+ "nsp": "^1.1.0",
+ "semver": "^5.0.3",
+ "tape": "^4.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "keywords": [
+ "Date",
+ "ES6",
+ "toStringTag",
+ "@@toStringTag",
+ "Date object"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "is-date-object",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/ljharb/is-date-object.git"
+ },
+ "scripts": {
+ "coverage": "covert test.js",
+ "coverage-quiet": "covert test.js --quiet",
+ "eslint": "eslint test.js *.js",
+ "jscs": "jscs test.js *.js",
+ "lint": "npm run jscs && npm run eslint",
+ "security": "nsp package",
+ "test": "npm run lint && node --harmony --es-staging test.js && npm run security"
+ },
+ "testling": {
+ "browsers": [
+ "iexplore/6.0..latest",
+ "firefox/3.0..6.0",
+ "firefox/15.0..latest",
+ "firefox/nightly",
+ "chrome/4.0..10.0",
+ "chrome/20.0..latest",
+ "chrome/canary",
+ "opera/10.0..latest",
+ "opera/next",
+ "safari/4.0..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2"
+ ],
+ "files": "test.js"
+ },
+ "version": "1.0.1"
+} \ No newline at end of file
diff --git a/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/test.js b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/test.js
new file mode 100644
index 00000000000..29f0917bc4a
--- /dev/null
+++ b/chromium/third_party/devtools-frontend/src/node_modules/is-date-object/test.js
@@ -0,0 +1,33 @@
+'use strict';
+
+var test = require('tape');
+var isDate = require('./');
+var hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol';
+
+test('not Dates', function (t) {
+ t.notOk(isDate(), 'undefined is not Date');
+ t.notOk(isDate(null), 'null is not Date');
+ t.notOk(isDate(false), 'false is not Date');
+ t.notOk(isDate(true), 'true is not Date');
+ t.notOk(isDate(42), 'number is not Date');
+ t.notOk(isDate('foo'), 'string is not Date');
+ t.notOk(isDate([]), 'array is not Date');
+ t.notOk(isDate({}), 'object is not Date');
+ t.notOk(isDate(function () {}), 'function is not Date');
+ t.notOk(isDate(/a/g), 'regex literal is not Date');
+ t.notOk(isDate(new RegExp('a', 'g')), 'regex object is not Date');
+ t.end();
+});
+
+test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) {
+ var realDate = new Date();
+ var fakeDate = { toString: function () { return String(realDate); }, valueOf: function () { return realDate.getTime(); } };
+ fakeDate[Symbol.toStringTag] = 'Date';
+ t.notOk(isDate(fakeDate), 'fake Date with @@toStringTag "Date" is not Date');
+ t.end();
+});
+
+test('Dates', function (t) {
+ t.ok(isDate(new Date()), 'new Date() is Date');
+ t.end();
+});