Skip to content

Commit

Permalink
Release type-guarden
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronccasanova committed Nov 16, 2022
1 parent ab97c05 commit 74ebe4b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/rare-crews-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'type-guarden': patch
---

Refined existing APIs and added more basic type guards
22 changes: 22 additions & 0 deletions packages/type-guarden/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ const obj = {

const arr = ['foo', 'bar', 'baz']

let key: unknown
let element: unknown

if (isKeyOf(obj, key)) {
// `key` is 'foo' | 'baz'
}
Expand All @@ -28,3 +31,22 @@ if (isElementOf(arr, element)) {
// `element` is 'foo' | 'bar' | 'baz'
}
```

## APIs

- `isKeyOf`
- `isElementOf`
- `isBigInt`
- `isBoolean`
- `isNull`
- `isNumber`
- `isString`
- `isSymbol`
- `isUndefined`
- `isFunction`
- `isObject`
- `isPlainObject`
- `isPromise`
- `isPrimitive`
- `isTruthy`
- `isFalsy`

3 comments on commit 74ebe4b

@vercel
Copy link

@vercel vercel bot commented on 74ebe4b Nov 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

aacc-next-ts-styled-comps – ./recipes/next-ts-styled-comps

aacc-next-ts-styled-comps-git-main-aaronccasanova-gmailcom.vercel.app
aacc-next-ts-styled-comps.vercel.app
aacc-next-ts-styled-comps-aaronccasanova-gmailcom.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 74ebe4b Nov 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 74ebe4b Nov 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

aacc-next-ts – ./recipes/next-ts

aacc-next-ts-git-main-aaronccasanova-gmailcom.vercel.app
aacc-next-ts.vercel.app
aacc-next-ts-aaronccasanova-gmailcom.vercel.app

Please sign in to comment.