@scalar/helpers 0.2.7 → 0.2.8

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @scalar/helpers
2
2
 
3
+ ## 0.2.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#7751](https://github.com/scalar/scalar/pull/7751): fix: auth persistence
8
+
3
9
  ## 0.2.7
4
10
 
5
11
  ### Patch Changes
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Returns true if the provided value is a plain object
3
+ * (i.e. not null, not an array, and typeof value is "object").
4
+ *
5
+ * This is a type guard useful for narrowing types in TypeScript.
6
+ *
7
+ * Examples:
8
+ * isObject({}) // true
9
+ * isObject({ a: 1 }) // true
10
+ * isObject([]) // false (Array)
11
+ * isObject(null) // false
12
+ * isObject(123) // false
13
+ * isObject('string') // false
14
+ * isObject(new Date()) // true (note: Date is technically an object)
15
+ * isObject(Object.create(null)) // true
16
+ */
17
+ export declare const isObject: (value: unknown) => value is Record<string, unknown>;
18
+ //# sourceMappingURL=is-object.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-object.d.ts","sourceRoot":"","sources":["../../src/object/is-object.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAExE,CAAA"}
@@ -0,0 +1,7 @@
1
+ const isObject = (value) => {
2
+ return typeof value === "object" && value !== null && !Array.isArray(value);
3
+ };
4
+ export {
5
+ isObject
6
+ };
7
+ //# sourceMappingURL=is-object.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/object/is-object.ts"],
4
+ "sourcesContent": ["/**\n * Returns true if the provided value is a plain object\n * (i.e. not null, not an array, and typeof value is \"object\").\n *\n * This is a type guard useful for narrowing types in TypeScript.\n *\n * Examples:\n * isObject({}) // true\n * isObject({ a: 1 }) // true\n * isObject([]) // false (Array)\n * isObject(null) // false\n * isObject(123) // false\n * isObject('string') // false\n * isObject(new Date()) // true (note: Date is technically an object)\n * isObject(Object.create(null)) // true\n */\nexport const isObject = (value: unknown): value is Record<string, unknown> => {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n"],
5
+ "mappings": "AAgBO,MAAM,WAAW,CAAC,UAAqD;AAC5E,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;",
6
+ "names": []
7
+ }
@@ -1,11 +1,11 @@
1
1
  /** Spy on console.warn */
2
- export declare const consoleWarnSpy: import("vitest").MockInstance<{
2
+ export declare const consoleWarnSpy: import("vitest").Mock<{
3
3
  (...data: any[]): void;
4
4
  (message?: any, ...optionalParams: any[]): void;
5
5
  }>;
6
6
  export declare let isConsoleWarnEnabled: boolean;
7
7
  /** Spy on console.error */
8
- export declare const consoleErrorSpy: import("vitest").MockInstance<{
8
+ export declare const consoleErrorSpy: import("vitest").Mock<{
9
9
  (...data: any[]): void;
10
10
  (message?: any, ...optionalParams: any[]): void;
11
11
  }>;
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "helpers",
15
15
  "js"
16
16
  ],
17
- "version": "0.2.7",
17
+ "version": "0.2.8",
18
18
  "engines": {
19
19
  "node": ">=20"
20
20
  },
@@ -89,8 +89,8 @@
89
89
  ],
90
90
  "devDependencies": {
91
91
  "jsdom": "26.1.0",
92
- "vite": "7.1.11",
93
- "vitest": "3.2.4",
92
+ "vite": "^7.3.1",
93
+ "vitest": "4.0.16",
94
94
  "@scalar/build-tooling": "0.4.1"
95
95
  },
96
96
  "scripts": {