
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
empower-assert
Advanced tools
Convert assert to power-assert on ESTree AST.
$ npm install --save-dev empower-assert
const empowerAssert = require('empower-assert');
const acorn = require('acorn');
const escodegen = require('escodegen');
let source =
`'use strict';
const assert = require('assert');
function add(a, b) {
assert(!isNaN(a));
assert.equal(typeof b, 'number');
assert.ok(!isNaN(b));
return a + b;
}`;
let transformed = empowerAssert(acorn.parse(source));
console.log(escodegen.generate(transformed));
// 'use strict';
// const assert = require('power-assert');
// function add(a, b) {
// assert(!isNaN(a));
// assert.equal(typeof b, 'number');
// assert.ok(!isNaN(b));
// return a + b;
// }
MIT License: Teppei Sato <teppeis@gmail.com>
This is a port of babel-plugin-empower-assert.
Copyright (c) 2016 Takuto Wada, https://github.com/power-assert-js/babel-plugin-empower-assert
FAQs
Convert assert to power-assert on ESTree AST
The npm package empower-assert receives a total of 32,616 weekly downloads. As such, empower-assert popularity was classified as popular.
We found that empower-assert demonstrated a not healthy version release cadence and project activity because the last version was released 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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.