Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@textlint/module-interop
Advanced tools
ECMAScript module interop library.
import .default
from ES module or CommonJS module.
example.mjs
const value = 42;
export default value;
import {moduleInterop} from "@textlint/module-interop";
// Doesn't matter if `require` uses `module.exports` or ES Module `export`
const value = moduleInterop(require("./example"));
console.log(value); // 42
Notes: This library is for common use. This library is not depended on textlint.
Some rule modules use export default
.
If you creating rule preset for textlint, you should wrap the required result.
const rule = require("textlint-rule-es-export-default-example");
console.log(rule); // { default: ruleImplementation }
This library resolve this issue by moduleInterop
function.
const {moduleInterop} = require("@textlint/module-interop");
const rule = moduleInterop(require("textlint-rule-es-export-default-example"));
console.log(rule); // ruleImplementation
Install with npm:
npm install @textlint/module-interop
const {moduleInterop} = require("@textlint/module-interop");
const rule = moduleInterop(require("textlint-rule-example")); // rule implementation
require
that prevent static analyzer like Asset Relocator Loader for Webpack.See Releases page.
Install devDependencies and Run npm test
:
npm test
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT © azu
FAQs
ECMAScript module interop library
We found that @textlint/module-interop demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.