Use npm install
Explain how to use `npm install` to install 3rd-party libraries to Proxyman Script
Use npm Packages in Proxyman Scripting
Install a package
$ cd "$HOME/Library/Application Support/com.proxyman.NSProxy"
$ npm install --prefix . dayjs --ignore-scripts --no-audit --no-fund~/Library/Application Support/com.proxyman.NSProxy/node_modulesUse a package in a script
const dayjs = require("dayjs");
async function onRequest(context, url, request) {
const formattedDate = dayjs("2026-05-05T13:00:00Z").format("YYYY-MM-DD");
request.headers["X-Proxyman-Dayjs"] = formattedDate;
return request;
}Examples
Format a date with dayjs
dayjsNormalize text with lodash
lodashValidate input with validator
validatorCreate slugs with slugify
slugifyEncode data with js-base64
js-base64Decode HTML entities with he
heCompatibility
Node.js native libraries
Troubleshooting
Last updated
Was this helpful?