Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@cher-ami/debug
Advanced tools
Tiny debug tool (~500 bytes) for terminal and browser inspired by visionmedia/debug API.
This repo is a fork of @wbe/debug
Tiny debug tool (~500 bytes) for terminal and browser inspired by visionmedia/debug API.
@cher-ami/debug
was built in order to be as light as possible for terminal and browser,
as the same way as the great visionmedia/debug tool.
$ npm i @cher-ami/debug
DEBUG=* node file.js
const debug = require("@cher-ami/debug")
debug('foo'); // "foo"
process.env.DEBUG
value can be defined as a specific namespace too:
DEBUG=namespace node file.js
Only debug function declaration with namespace
declared as namespace will be printed in the console:
// add the namspace as returned function paramater
const debug = require("@cher-ami/debug")("namespace")
debug('foo'); // "namespace foo"
process.env.DEBUG
value accept "one glob parameter level":
DEBUG=config:* node file.js
Every debug function declaration with namespace config:{somestring}
will be logged.
In the same way as nodejs usage, debug
is browser compatible with the same API. The only difference is
we need to set the current namespace in localStorage.
Add on your browser localStorage:
localStorage.debug = "foo"
Use debug in javascript:
// es6 import
import debug from "@cher-ami/debug"
const log = debug('foo');
log("bar") // "foo bar"
// commonjs import
const debug = require("@cher-ami/debug")("foo")
debug('bar'); // "foo bar"
Install dependencies:
pnpm i
Start example:
# browser example
npm run dev:example-browser
# node example
npm run dev:example-dev
MIT
FAQs
Tiny debug tool (~500 bytes) for terminal and browser inspired by visionmedia/debug API.
The npm package @cher-ami/debug receives a total of 392 weekly downloads. As such, @cher-ami/debug popularity was classified as not popular.
We found that @cher-ami/debug demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.