Skip to content

Commit

Permalink
refactor(is {}): add objectKeysIn(), objectSomeKeys() functions a…
Browse files Browse the repository at this point in the history
…nd freeze the object.
  • Loading branch information
sciborrudnicki committed Sep 20, 2021
1 parent 6d190f5 commit 0efe8ae
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/is/lib/is.object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import { isObject } from './is-object.func';
import { isObjectKey } from './is-object-key.func';
import { isObjectKeyIn } from './is-object-key-in.func';
import { isObjectKeys } from './is-object-keys.func';
import { isObjectKeysIn } from './is-object-keys-in.func';
import { isObjectSomeKeys } from './is-object-some-keys.func';
import { isPrimitive } from './is-primitive.func';
import { isRegExp } from './is-regexp.func';
import { isString } from './is-string.func';
Expand All @@ -36,8 +38,10 @@ import { isUndefined } from './is-undefined.func';
import { isNot } from '../not/lib/is-not.object';
// Interface.
import { Is } from '../interface/is.interface';
// Export: `is`.
export const is: Is = {
/**
* The object contains prefixed with is functions and prefixed with isNot functions in property `not`.
*/
export const is: Is = Object.freeze({
array: isArray,
bigint: isBigInt,
boolean: isBoolean,
Expand All @@ -60,6 +64,8 @@ export const is: Is = {
objectKey: isObjectKey,
objectKeyIn: isObjectKeyIn,
objectKeys: isObjectKeys,
objectKeysIn: isObjectKeysIn, // From the `5.0.0` version.
objectSomeKeys: isObjectSomeKeys, // From the `5.0.0` version.
primitive: isPrimitive,
regexp: isRegExp, // From the `4.2.0` version.
string: isString,
Expand All @@ -72,4 +78,4 @@ export const is: Is = {
true: isTrue, // From the `4.2.0` version.
type: isType,
undefined: isUndefined
};
});

0 comments on commit 0efe8ae

Please sign in to comment.