
Research
6 Malicious Packagist Themes Ship Trojanized jQuery and FUNNULL Redirect Payloads
Six malicious Packagist packages posing as OphimCMS themes contain trojanized jQuery that exfiltrates URLs, injects ads, and loads FUNNULL-linked redirects.
@eggjs/tegg-common-util
Advanced tools
Common utility functions for tegg framework.
A utility method for deduplicating module references to avoid adding duplicate modules.
public static deduplicateModules(
moduleReferences: readonly ModuleReference[]
): readonly ModuleReference[]
Note: This method does not accept options parameters. The behavior is fixed and optimized for common use cases.
import { ModuleConfigUtil } from '@eggjs/tegg-common-util';
const modules = [
{ name: 'module1', path: '/path/to/module1' },
{ name: 'module2', path: '/path/to/module2' },
{ name: 'module1', path: '/different/path/to/module1' }, // Will throw error
];
const result = ModuleConfigUtil.deduplicateModules(modules);
// Throws Error: Duplicate module name "module1" found
const modules = [
{ name: 'module1', path: '/path/to/module1', optional: true },
{ name: 'module1', path: '/path/to/module1' }, // Non-optional version
];
const result = ModuleConfigUtil.deduplicateModules(modules);
// Result: 1 module, non-optional version kept
const modules = [
{ name: 'module1', path: '/path/to/module1' },
{ name: 'module2', path: '/path/to/module1' }, // Same path, different name
];
const result = ModuleConfigUtil.deduplicateModules(modules);
// Result: 1 module, first occurrence kept
// In ModuleScanner.loadModuleReferences()
return ModuleConfigUtil.deduplicateModules(allModuleReferences);
// Automatically handles deduplication with optimal defaults
// In Runner.getModuleReferences()
return ModuleConfigUtil.deduplicateModules(allModuleReferences);
// Simple and reliable deduplication
try {
const result = ModuleConfigUtil.deduplicateModules(modules);
} catch (error) {
if (error.message.includes('Duplicate module name')) {
// Handle duplicate module name error
console.error('Configuration error:', error.message);
}
throw error;
}
// This API never existed in the actual implementation
const result = ModuleConfigUtil.deduplicateModules(modules, {
prioritizeNonOptional: true,
allowNameDuplicates: false,
logPrefix: '[tegg/config]',
logger: customLogger,
});
// Current implementation - simple and direct
const result = ModuleConfigUtil.deduplicateModules(modules);
// Automatically handles all deduplication logic
FAQs
common util for tegg
The npm package @eggjs/tegg-common-util receives a total of 372 weekly downloads. As such, @eggjs/tegg-common-util popularity was classified as not popular.
We found that @eggjs/tegg-common-util demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 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.

Research
Six malicious Packagist packages posing as OphimCMS themes contain trojanized jQuery that exfiltrates URLs, injects ads, and loads FUNNULL-linked redirects.

Security News
The GCVE initiative operated by CIRCL has officially opened its publishing ecosystem, letting organizations issue and share vulnerability identifiers without routing through a central authority.

Security News
The project is retiring its odd/even release model in favor of a simpler annual cadence where every major version becomes LTS.