Skip to content

Commit

Permalink
do not convert class instances
Browse files Browse the repository at this point in the history
  • Loading branch information
dword-design committed Oct 4, 2024
1 parent 1f4b26d commit 8522e9a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {Buffer} from 'node:buffer';
import mapObject from 'map-obj';
import camelCase from 'camelcase';
import QuickLru from 'quick-lru';
Expand All @@ -19,10 +18,7 @@ const cache = new QuickLru({maxSize: 100_000});
const isObject = value =>
typeof value === 'object'
&& value !== null
&& !(value instanceof RegExp)
&& !(value instanceof Error)
&& !(value instanceof Date)
&& !(value instanceof Buffer);
&& (Array.isArray(value) || Object.getPrototypeOf(value) === Object.prototype);

const transform = (input, options = {}) => {
if (!isObject(input)) {
Expand Down

0 comments on commit 8522e9a

Please sign in to comment.