Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Noelware/utils
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5ae3842bd921626f37d1659d76f22f74b5489464
Choose a base ref
...
head repository: Noelware/utils
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d44a93e0b007671e8ab27c2816afb1b649f4c8a9
Choose a head ref
  • 11 commits
  • 4 files changed
  • 2 contributors

Commits on Apr 26, 2021

  1. Copy the full SHA
    a9f304b View commit details
  2. Copy the full SHA
    9b91b09 View commit details

Commits on Apr 27, 2021

  1. Copy the full SHA
    0dcde2c View commit details

Commits on May 4, 2021

  1. Copy the full SHA
    e506d9b View commit details

Commits on May 5, 2021

  1. Copy the full SHA
    350ea89 View commit details
  2. Copy the full SHA
    e4c56e9 View commit details

Commits on May 8, 2021

  1. Copy the full SHA
    eea706a View commit details

Commits on May 10, 2021

  1. Copy the full SHA
    c4ce52c View commit details

Commits on May 13, 2021

  1. Copy the full SHA
    d4ae608 View commit details

Commits on May 16, 2021

  1. fix type generic in isObject

    auguwu committed May 16, 2021
    Copy the full SHA
    cb91c35 View commit details
  2. Copy the full SHA
    d44a93e View commit details
Showing with 373 additions and 117 deletions.
  1. +1 −1 index.d.ts
  2. +364 −108 package-lock.json
  3. +7 −7 package.json
  4. +1 −1 src/index.ts
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -169,7 +169,7 @@ declare namespace utils {
*
* @param x The value to check
*/
export function isObject<T extends object = Record<string, unknown>>(x: unknown): x is T;
export function isObject<T extends object>(x: unknown): x is T;

/**
* Omits `undefined` and `null` from a object, doesn't
472 changes: 364 additions & 108 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@augu/utils",
"description": "🌸 Extra utilities to keep code consise and non-repeative.",
"version": "1.5.1",
"version": "1.5.2",
"main": "build/index.js",
"types": "index.d.ts",
"author": "August <cutie@floofy.dev>",
@@ -27,13 +27,13 @@
"devDependencies": {
"@augu/eslint-config": "2.0.3",
"@augu/tsconfig": "1.1.0",
"@types/jest": "26.0.22",
"@types/node": "14.14.41",
"@typescript-eslint/eslint-plugin": "4.22.0",
"@typescript-eslint/parser": "4.22.0",
"eslint": "7.25.0",
"@types/jest": "26.0.23",
"@types/node": "14.14.45",
"@typescript-eslint/eslint-plugin": "4.23.0",
"@typescript-eslint/parser": "4.23.0",
"eslint": "7.26.0",
"jest": "26.6.3",
"ts-jest": "26.5.5",
"ts-jest": "26.5.6",
"typescript": "4.2.4"
}
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -136,7 +136,7 @@ export function calculateHRTime(start: [seconds: number, nanoseconds: number]) {
*
* @param x The value to check
*/
export function isObject<T extends object = Record<string, unknown>>(x: unknown): x is T {
export function isObject<T extends object>(x: unknown): x is T {
return !Array.isArray(x) && x !== null && typeof x === 'object';
}