@stryke/type-checks 0.3.18 → 0.4.1

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/dist/index.cjs CHANGED
@@ -432,6 +432,17 @@ Object.keys(_isUndefined).forEach(function (key) {
432
432
  }
433
433
  });
434
434
  });
435
+ var _isUrl = require("./is-url.cjs");
436
+ Object.keys(_isUrl).forEach(function (key) {
437
+ if (key === "default" || key === "__esModule") return;
438
+ if (key in exports && exports[key] === _isUrl[key]) return;
439
+ Object.defineProperty(exports, key, {
440
+ enumerable: true,
441
+ get: function () {
442
+ return _isUrl[key];
443
+ }
444
+ });
445
+ });
435
446
  var _propertyExists = require("./property-exists.cjs");
436
447
  Object.keys(_propertyExists).forEach(function (key) {
437
448
  if (key === "default" || key === "__esModule") return;
package/dist/index.d.ts CHANGED
@@ -45,5 +45,6 @@ export * from "./is-symbol";
45
45
  export * from "./is-typed";
46
46
  export * from "./is-typed-array";
47
47
  export * from "./is-undefined";
48
+ export * from "./is-url";
48
49
  export * from "./property-exists";
49
50
  export * from "./type-detect";
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export*from"./get-object-tag";export*from"./is-array-like";export*from"./is-async-iterable";export*from"./is-bigint";export*from"./is-boolean";export*from"./is-buffer";export*from"./is-collection";export*from"./is-date";export*from"./is-deep-key";export*from"./is-empty";export*from"./is-empty-object";export*from"./is-empty-string";export*from"./is-equal";export*from"./is-error";export*from"./is-file-result";export*from"./is-float";export*from"./is-function";export*from"./is-integer";export*from"./is-mergeable-object";export*from"./is-not-empty";export*from"./is-null";export*from"./is-number";export*from"./is-object";export*from"./is-object-index";export*from"./is-plain-object";export*from"./is-primitive";export*from"./is-promise";export*from"./is-react-element";export*from"./is-ref";export*from"./is-regexp";export*from"./is-select-option";export*from"./is-set";export*from"./is-set-object";export*from"./is-set-string";export*from"./is-string";export*from"./is-symbol";export*from"./is-typed";export*from"./is-typed-array";export*from"./is-undefined";export*from"./property-exists";export*from"./type-detect";
1
+ export*from"./get-object-tag";export*from"./is-array-like";export*from"./is-async-iterable";export*from"./is-bigint";export*from"./is-boolean";export*from"./is-buffer";export*from"./is-collection";export*from"./is-date";export*from"./is-deep-key";export*from"./is-empty";export*from"./is-empty-object";export*from"./is-empty-string";export*from"./is-equal";export*from"./is-error";export*from"./is-file-result";export*from"./is-float";export*from"./is-function";export*from"./is-integer";export*from"./is-mergeable-object";export*from"./is-not-empty";export*from"./is-null";export*from"./is-number";export*from"./is-object";export*from"./is-object-index";export*from"./is-plain-object";export*from"./is-primitive";export*from"./is-promise";export*from"./is-react-element";export*from"./is-ref";export*from"./is-regexp";export*from"./is-select-option";export*from"./is-set";export*from"./is-set-object";export*from"./is-set-string";export*from"./is-string";export*from"./is-symbol";export*from"./is-typed";export*from"./is-typed-array";export*from"./is-undefined";export*from"./is-url";export*from"./property-exists";export*from"./type-detect";
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isURL = void 0;
7
+ var _isSetObject = require("./is-set-object.cjs");
8
+ var _isSetString = require("./is-set-string.cjs");
9
+ const isURL = s => (0, _isSetObject.isSetObject)(s) && (0, _isSetString.isSetString)(s.hash) && (0, _isSetString.isSetString)(s.host) && (0, _isSetString.isSetString)(s.hostname) && (0, _isSetString.isSetString)(s.href) && (0, _isSetString.isSetString)(s.origin) && (0, _isSetString.isSetString)(s.protocol);
10
+ exports.isURL = isURL;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Determine if the provided value is of type URL
3
+ *
4
+ * @param value - The value to type check
5
+ * @returns An indicator specifying if the value provided is of type `URL`
6
+ */
7
+ export declare const isURL: (value: unknown) => value is URL;
@@ -0,0 +1 @@
1
+ import{isSetObject as t}from"./is-set-object";import{isSetString as o}from"./is-set-string";export const isURL=s=>t(s)&&o(s.hash)&&o(s.host)&&o(s.hostname)&&o(s.href)&&o(s.origin)&&o(s.protocol);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/type-checks",
3
- "version": "0.3.18",
3
+ "version": "0.4.1",
4
4
  "type": "module",
5
5
  "description": "A package containing various type-check functions to validate TypeScript values.",
6
6
  "repository": {
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "private": false,
12
12
  "publishConfig": { "access": "public" },
13
- "dependencies": { "@stryke/types": "^0.10.8" },
13
+ "dependencies": { "@stryke/types": "^0.10.10" },
14
14
  "devDependencies": {},
15
15
  "sideEffects": false,
16
16
  "files": ["dist/**/*"],
@@ -83,6 +83,20 @@
83
83
  "default": "./dist/property-exists.mjs"
84
84
  }
85
85
  },
86
+ "./is-url": {
87
+ "import": {
88
+ "types": "./dist/is-url.d.ts",
89
+ "default": "./dist/is-url.mjs"
90
+ },
91
+ "require": {
92
+ "types": "./dist/is-url.d.ts",
93
+ "default": "./dist/is-url.cjs"
94
+ },
95
+ "default": {
96
+ "types": "./dist/is-url.d.ts",
97
+ "default": "./dist/is-url.mjs"
98
+ }
99
+ },
86
100
  "./is-undefined": {
87
101
  "import": {
88
102
  "types": "./dist/is-undefined.d.ts",
@@ -664,5 +678,5 @@
664
678
  "main": "./dist/index.cjs",
665
679
  "module": "./dist/index.mjs",
666
680
  "types": "./dist/index.d.ts",
667
- "gitHead": "0bf29ab54e34a0247f121fa489941a93625748d9"
681
+ "gitHead": "bd066535c2758c8e05be32ad1e292cab7dcdf2d3"
668
682
  }