Skip to content

Commit 050789b

Browse files
jdaltonclaude
andcommitted
refactor: use isObject from socket-registry instead of local implementation
Replace local isObject implementation with the identical one from @socketsecurity/registry/lib/objects to reduce code duplication. This doesn't inflate the build as rollup just creates a re-export reference to the external module. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 3b74ecb commit 050789b

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/objects.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@
22
* @fileoverview Object utility functions for type checking and immutable object creation.
33
* Provides object validation and recursive freezing utilities.
44
*/
5-
import { LOOP_SENTINEL } from './constants.js'
5+
// eslint-disable-next-line import-x/extensions -- External package, no .js extension needed
6+
import { isObject } from '@socketsecurity/registry/lib/objects'
67

7-
/**
8-
* Check if value is an object type.
9-
*/
10-
function isObject(value: unknown): value is object {
11-
return value !== null && typeof value === 'object'
12-
}
8+
import { LOOP_SENTINEL } from './constants.js'
139

1410
/**
1511
* Recursively freeze an object and all nested objects.

0 commit comments

Comments
 (0)