🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@rzl-zone/node-only

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rzl-zone/node-only - npm Package Compare versions

Comparing version
0.0.10
to
0.0.11-beta.0
+1
-1
package.json
{
"name": "@rzl-zone/node-only",
"version": "0.0.10",
"version": "0.0.11-beta.0",
"description": "Marker package to restrict imports to Node.js and server-only environments.",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -7,2 +7,16 @@ ## Node Only

### Example usage
```ts
import "@rzl-zone/node-only";
import fs from "node:fs";
export function readConfig() {
return fs.readFileSync("./config.json", "utf-8");
}
```
If this module is imported inside a client-side environment, it will throw an error and prevent accidental usage.
[Read More Documentation](https://rzlzone.vercel.app/docs/node-only)