// npm package
onfire.js
onfire.js is a mini (~500 b) version for event-emitter.
versions
9
maintainers
1
license
MIT
first publish
2016-07-15
publisher
atool
tarball
9,923 B
AUTO-PUBLISHED·1 version indexed·latest published 2019-04-22
// 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· @2.0.1· no static-pattern hits
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 2 known-vendor host(s).
- @2.0.1··AUTO-PUBLISHED·publisher: atoolheuristic 75/100static flags 0llm benign (0.85) via ollamapublisher-multi-name-burst:5osv-flagged:MAL-2026-4149
→ No suspicious destination, no remote-exec shape — 2 known-vendor host(s).
// offending code· no static-pattern hits
--- package.json (entry) --- { "name": "onfire.js", "officialName": "onfire.js", "version": "2.0.1", "summary": "onfire.js is a mini (~500 b) version for event-emitter.", "description": "onfire.js is a mini (~500 b) version for event-emitter.", "author": { "name": "hustcc", "url": "https://atool.vip/" }, "license": "MIT", "keywords": [ "onfire", "ee", "event", "emitter", "event-emitter", "subscribe" ], "main": "lib/index.js", "repository": { "type": "git", "url": "https://github.com/hustcc/onfire.js" }, "bugs": { "url": "https://github.com/hustcc/onfire.js/issues" }, "devDependencies": { "@babel/cli": "^7.2.3", "@babel/core": "^7.2.2", "@babel/preset-env": "^7.2.3", "@types/jest": "^23.3.10", "babel-plugin-version": "^0.2.3", "jest": "^23.6.0", "rimraf": "^2.6.2", "ts-jest": "^23.10.5", "typescript": "^3.2.2" }, "scripts": { "lint": "tsc --noEmit", "test": "jest", "build": "rimraf tmp lib && tsc && babel tmp --out-dir lib --copy-files && rimraf tmp" }, "dependencies": {}, "jest": { "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.ts$", "transform": { "^.+\\.(ts|t --- index.js (entry) --- "use strict"; /** * mini (~500 b) version for event-emitter. * * Created by hustcc on 2018/12/31 * Contract: vip@hust.edu.cn */ Object.defineProperty(exports, "__esModule", { value: true }); /** * const ee = new OnFire(); * * ee.on('click', (...values) => {}); * * ee.on('mouseover', (...values) => {}); * * ee.emit('click', 1, 2, 3); * ee.fire('mouseover', {}); // same with emit * * ee.off(); */ var OnFire = /** @class */ function () { function OnFire() { // 所有事件的监听器 this.es = {}; } OnFire.prototype.on = function (eventName, cb, once) { if (once === void 0) { once = false; } if (!this.es[eventName]) { this.es[eventName] = []; } this.es[eventName].push({ cb: cb, once: once }); }; OnFire.prototype.once = function (eventName, cb) { this.on(eventName, cb, true); }; OnFire.prototype.fire = function (eventName) { var params = []; for (var _i = 1; _i < arguments.length; _i++) { params[_i - 1] = arguments[_i]; } var listeners = this.es[eventName] || []; var l = listeners.length; for (var i = 0; i < l; i++) { var _a = listeners[i], cb = _a.cb,
