Skip to content

Commit

Permalink
inline objLength
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Mar 1, 2025
1 parent f842a0c commit d52a4cc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/serialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ const Serializer = /*@__PURE__*/ (function () {

serializeObject(object: any): string {
const objString = Object.prototype.toString.call(object);
const objLength = objString.length;
const objType =
objLength < 10 // '[object a]'.length === 10, the minimum
objString.length < 10 // '[object a]'.length === 10, the minimum
? `unknown:${objString}`

Check warning on line 62 in src/serialize.ts

View check run for this annotation

Codecov / codecov/patch

src/serialize.ts#L62

Added line #L62 was not covered by tests
: objString.slice(8, -1); // '[object '.length === 8

Expand Down

0 comments on commit d52a4cc

Please sign in to comment.