
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
The purpose of this library is to be a zero dependency and exact replica of the PHP empty function.
According to the PHP documentation, the following values are considered to be empty:
Install with your favorite package manager:
npm install --save empty-php
To use the library:
import { empty } from "empty-php";
if (empty(myVar)) {
// It's empty
}
This project complies with Semantic Versioning.
For a complete list of changes, and how to migrate between major versions, see releases page.
FAQs
Exact replica of the PHP empty function in for JavaScript and TypeScript
We found that empty-php 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.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.