
Security News
Opengrep Adds Apex Support and New Rule Controls in Latest Updates
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
amd-codemod
Advanced tools
A codemod for jscodeshift that will convert amd modules to es6 ones.
// input
define([
"some/module",
"some/other/module"
], (
SomeModule,
SomeOtherModule
) => {
});
// output
import SomeModule from "some/module";
import SomeOtherModule from "some/other/module";
// input
define([], () => {
return 'some-value';
});
// output
export default 'some-value';
// Input
define(['exports'], (
exports
) => {
exports.someProp = "some-value";
exports.anotherProp = "another-value";
});
// Output
export const someProp = "some-value";
export const anotherProp = "some-value";
export default {someProp, anotherProp};
// Input
const myModule = require("some/module");
// Output
import myModule from "some/module";
In the case of webpack you can use require.ensure to load code on demand, with webpack 2 you can do this via System.import.
// Input
require.ensure([], () => {
const myModule = require("some/module");
});
// Output
System.import("some/module").then((someModule) => {
const myModule = someModule;
});
FAQs
Converts amd modules to es6 modules
The npm package amd-codemod receives a total of 1 weekly downloads. As such, amd-codemod popularity was classified as not popular.
We found that amd-codemod 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 latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.