// npm package
@antv/event-emitter
event emitter for antvis.
versions
4
maintainers
52
license
MIT
first publish
2019-07-19
publisher
atool
tarball
16,818 B
AUTO-PUBLISHED·1 version indexed·latest published 2022-02-10
// publisher campaignby atool
9 caught packages from this accountThis is not an isolated catch. The same publisher has shipped 8 other packages that our pipeline flagged — the shape of a coordinated campaign, not a one-off. Each link below opens that sibling's analysis.
// offending code· @0.1.3· no static-pattern hits
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
- @0.1.3··AUTO-PUBLISHED·publisher: atoolheuristic 75/100static flags 0llm benign (0.85) via ollamarecent-owner-changepublisher-multi-name-burst:5dormant-takeover:prev=zqlu@0.1.2osv-flagged:MAL-2026-3879
→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
// offending code· no static-pattern hits
--- package.json (entry) --- { "name": "@antv/event-emitter", "version": "0.1.3", "description": "event emitter for antvis.", "license": "MIT", "main": "lib/index.js", "module": "esm/index.js", "types": "lib/index.d.ts", "files": [ "src", "lib", "esm", "README.md", "LICENSE" ], "publishConfig": { "access": "public" }, "repository": { "type": "git", "url": "git@github.com:antvis/event-emitter.git" }, "scripts": { "build": "run-s clean lib", "clean": "rimraf lib esm", "lib": "run-p lib:*", "lib:cjs": "tsc -p tsconfig.json --target ES5 --module commonjs --outDir lib", "lib:esm": "tsc -p tsconfig.json --target ES5 --module ESNext --outDir esm", "test": "jest" }, "devDependencies": { "@types/jest": "^24.0.18", "jest": "^24.9.0", "jest-electron": "^0.1.7", "npm-run-all": "^4.1.5", "prettier": "^2.0.2", "rimraf": "^2.6.2", "ts-jest": "^24.1.0", "typescript": "^3.6.4" }, "jest": { "preset": "ts-jest", "runner": "jest-electron/runner", "testEnvironment": "jest-electron/environment", "collectCoverage": true, "collectCoverageFrom": [ "src/**/*.ts", "!**/node_modules/* --- index.js (entry) --- "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var WILDCARD = '*'; /* event-emitter */ var EventEmitter = /** @class */ (function () { function EventEmitter() { this._events = {}; } /** * 监听一个事件 * @param evt * @param callback * @param once */ EventEmitter.prototype.on = function (evt, callback, once) { if (!this._events[evt]) { this._events[evt] = []; } this._events[evt].push({ callback: callback, once: !!once, }); return this; }; /** * 监听一个事件一次 * @param evt * @param callback */ EventEmitter.prototype.once = function (evt, callback) { return this.on(evt, callback, true); }; /** * 触发一个事件 * @param evt * @param args */ EventEmitter.prototype.emit = function (evt) { var _this = this; var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } var events = this._events[evt] || []; var wildcardEvents = this._events[WILDCARD] || []; // 实际的处理 emit 方法 var doE
