
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
@utilify/types
Advanced tools
A utility library for type checks and type manipulation in JavaScript and TypeScript, providing functions to determine types and verify values like null, undefined, boolean, number, and more.
Type utility functions provide methods to check, compare, and manipulate data types. They help identify if a value is of a specific type, such as checking if a value is a number, string, function, or a primitive value, as well as other useful checks.
To install the type utility functions, use one of the following commands, depending on your package manager:
npm install @utilify/types
yarn add @utilify/types
pnpm add @utilify/types
Once installed, you can import the functions into your project, using either ESM or CJS.
This library supports both the ESM and CJS module systems.
import { isString } from '@utilify/types';
const { isString } = require('@utilify/types');
Here is an overview of the functions available in the type utilities category:
function getInstanceTypeType(value: object): string | undefined
Returns the instance type of the value.
function getType(value: any): string
Returns the primitive type or the type of the object (such as "string", "object", "function", etc.).
function isArray(value: any): boolean
Checks if the value is an array.
function isAsync(callback: Function): boolean
Checks if the function is asynchronous.
function isBigint(value: any): boolean
Checks if the value is a BigInt.
function isBoolean(value: any): boolean
Checks if the value is a boolean.
function isDate(value: any): boolean
Checks if the value is an instance of Date.
function isError(value: unknown): value is Error
Checks if the value is an instance of Error.
function isEqualType(value1: any, value2: any): boolean
Compares the types of two values and returns if they are the same.
function isFalsy(value: any): boolean
Checks if the value is "falsy" (such as false, 0, null, undefined, NaN, or an empty string).
function isFunction(value: any): boolean
Checks if the value is a function.
function isJSON(value: any): boolean
Checks if the value is a valid JSON object.
function isMap(value: any): boolean
Checks if the value is an instance of Map.
function isNaN(value: any): boolean
Checks if the value is NaN (Not-a-Number).
function isNull(value: any): boolean
Checks if the value is null.
function isNumber(value: any): boolean
Checks if the value is a number.
function isObject(value: any): boolean
Checks if the provided value is a plain object or an object created from a non-native class.
function isPlainObject(value: any): boolean
Checks if the value is a plain object (not an instance of Map, Set, or other objects).
function isPrimitive(value: any): boolean
Checks if the value is a primitive type (string, number, bigint, boolean, symbol, undefined, null).
function isPromise(value: object): boolean
Checks if the value is a Promise.
function isRegExp(value: any): boolean
Checks if the value is a regular expression.
function isSet(value: any): boolean
Checks if the value is an instance of Set.
function isString(value: any): boolean
Checks if the value is a string.
function isSymbol(value: any): boolean
Checks if the value is a Symbol.
function isTruthy(value: any): boolean
Checks if the value is "truthy" (any value that is not false, 0, null, undefined, NaN, or an empty string).
function isUndefined(value: any): boolean
Checks if the value is undefined.
function isWeakMap(value: unknown): value is WeakMap<any, any>
Checks if the value is an instance of WeakMap.
function isWeakSet(value: unknown): value is WeakSet<any>
Checks if the value is an instance of WeakSet.
FAQs
A utility library for type checks and type manipulation in JavaScript and TypeScript, providing functions to determine types and verify values like null, undefined, boolean, number, and more.
The npm package @utilify/types receives a total of 4 weekly downloads. As such, @utilify/types popularity was classified as not popular.
We found that @utilify/types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.