@stryke/type-checks 0.1.2 → 0.1.4

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/README.md CHANGED
@@ -22,7 +22,7 @@ This package is part of Storm Software's **đŸŒŠī¸ Stryke** monorepo. Stryke pac
22
22
 
23
23
  <h3 align="center">đŸ’ģ Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
24
24
 
25
- [![Version](https://img.shields.io/badge/version-0.1.1-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/stryke/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
+ [![Version](https://img.shields.io/badge/version-0.1.3-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/stryke/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
26
26
 
27
27
  > [!IMPORTANT] This repository, and the apps, libraries, and tools contained
28
28
  > within, is still in it's initial development phase. As a result, bugs and
@@ -1,4 +1,4 @@
1
- import { Collection } from "@stryke/types/base";
1
+ import type { Collection } from "@stryke/types/base";
2
2
  /**
3
3
  * Check if the provided value's type is `Collection`
4
4
  *
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.isFileResult = void 0;
7
- var _file = require("@stryke/types/file");
8
7
  var _isSetObject = require("./is-set-object.cjs");
9
8
  var _isSetString = require("./is-set-string.cjs");
10
- const isFileResult = t => (0, _isSetObject.isSetObject)(t) && "status" in t && Object.values(_file.FileStatus).includes(t.status) && ((0, _isSetString.isSetString)(t?.uri) || (0, _isSetObject.isSetObject)(t?.file));
9
+ const isFileResult = t => (0, _isSetObject.isSetObject)(t) && "status" in t && ["initialized", "validated", "uploaded", "failed"].includes(t.status) && ((0, _isSetString.isSetString)(t?.uri) || (0, _isSetObject.isSetObject)(t?.file));
11
10
  exports.isFileResult = isFileResult;
@@ -1,4 +1,4 @@
1
- import { FileResult } from "@stryke/types/file";
1
+ import type { FileResult } from "@stryke/types/file";
2
2
  /**
3
3
  * Check if the provided value is a `FileResult` object
4
4
  *
@@ -1 +1 @@
1
- import{FileStatus as i}from"@stryke/types/file";import{isSetObject as s}from"./is-set-object";import{isSetString as e}from"./is-set-string";export const isFileResult=t=>s(t)&&"status"in t&&Object.values(i).includes(t.status)&&(e(t?.uri)||s(t?.file));
1
+ import{isSetObject as i}from"./is-set-object";import{isSetString as e}from"./is-set-string";export const isFileResult=t=>i(t)&&"status"in t&&["initialized","validated","uploaded","failed"].includes(t.status)&&(e(t?.uri)||i(t?.file));
package/dist/is-float.cjs CHANGED
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.isFloat = void 0;
7
7
  var _isNumber = require("./is-number.cjs");
8
- const isFloat = o => (0, _isNumber.isNumber)(o) && o % 1 !== 0;
8
+ const isFloat = t => (0, _isNumber.isNumber)(t) && t % 1 !== 0;
9
9
  exports.isFloat = isFloat;
@@ -1,4 +1,4 @@
1
- import { Float } from "@stryke/types/number";
1
+ import type { Float } from "@stryke/types/number";
2
2
  /**
3
3
  * Check if the provided value's type is a float
4
4
  *
package/dist/is-float.mjs CHANGED
@@ -1 +1 @@
1
- import{isNumber as t}from"./is-number";export const isFloat=o=>t(o)&&o%1!==0;
1
+ import{isNumber as e}from"./is-number";export const isFloat=t=>e(t)&&t%1!==0;
@@ -1,4 +1,4 @@
1
- import { AnyFunction } from "@stryke/types/base";
1
+ import type { AnyFunction } from "@stryke/types/base";
2
2
  export declare function isSyncFunction(value?: any): value is AnyFunction;
3
3
  export declare function isAsyncFunction(value?: any): value is AnyFunction;
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { Integer } from "@stryke/types/number";
1
+ import type { Integer } from "@stryke/types/number";
2
2
  /**
3
3
  * Check if the provided value's type is an integer
4
4
  *
@@ -1,4 +1,4 @@
1
- import { PlainObject } from "@stryke/types/base";
1
+ import type { PlainObject } from "@stryke/types/base";
2
2
  /**
3
3
  * Checks if `value` is object-like. A value is object-like if it's not `null`
4
4
  * and has a `typeof` result of "object".
package/dist/is-ref.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { RefObject } from "@stryke/types/base";
1
+ import type { RefObject } from "@stryke/types/base";
2
2
  /**
3
3
  * Check if the provided value's type is a ref
4
4
  *
@@ -1,4 +1,4 @@
1
- import { SelectOption } from "@stryke/types/form";
1
+ import type { SelectOption } from "@stryke/types/form";
2
2
  /**
3
3
  * Check if the provided value's type is SelectOption
4
4
  *
package/dist/is-typed.cjs CHANGED
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.isTyped = void 0;
7
7
  var _isObject = require("./is-object.cjs");
8
8
  var _isSet = require("./is-set.cjs");
9
- const isTyped = r => {
9
+ const isTyped = t => {
10
10
  try {
11
- return (0, _isSet.isSet)(r) && (0, _isObject.isObject)(r) && "__typename" in r;
11
+ return (0, _isSet.isSet)(t) && (0, _isObject.isObject)(t) && "__typename" in t;
12
12
  } catch {
13
13
  return !1;
14
14
  }
@@ -1,4 +1,4 @@
1
- import { ITyped } from "@stryke/types/base";
1
+ import type { ITyped } from "@stryke/types/base";
2
2
  /**
3
3
  * Check if the provided value has a `__typename` property
4
4
  *
package/dist/is-typed.mjs CHANGED
@@ -1 +1 @@
1
- import{isObject as t}from"./is-object";import{isSet as e}from"./is-set";export const isTyped=r=>{try{return e(r)&&t(r)&&"__typename"in r}catch{return!1}};
1
+ import{isObject as e}from"./is-object";import{isSet as r}from"./is-set";export const isTyped=t=>{try{return r(t)&&e(t)&&"__typename"in t}catch{return!1}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/type-checks",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
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.7.1" },
13
+ "dependencies": { "@stryke/types": ">=0.7.3" },
14
14
  "devDependencies": {},
15
15
  "sideEffects": false,
16
16
  "files": ["dist/**/*"],