Skip to content

Commit

Permalink
chore: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsSudip committed Jun 7, 2024
1 parent 3946f3f commit dae6b42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/analytics-js-integrations/src/utils/commonUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { isDefined, isString } from '@rudderstack/analytics-js-common/utilities/
import { pick as ramdaPick, pickBy, isEmpty } from 'ramda';

const isNotEmpty = x => {
if (typeof x === 'number' || typeof x === 'boolean') {
return isEmpty(x); // Numbers and booleans are inherently "not empty"
if (typeof x === 'object' || typeof x === 'string') {
return !isEmpty(x); // Numbers and booleans are inherently "not empty"
}
return !isEmpty(x);
return isEmpty(x);
};
const isNotNull = x => x != null;
const isDefinedAndNotNull = x => isDefined(x) && isNotNull(x);
Expand Down

0 comments on commit dae6b42

Please sign in to comment.