// npm package
xmorse
xmorse is a pure javascript(~1.5 kb) library for encode / decode morse code messages, unicode supported.
versions
5
maintainers
1
license
MIT
first publish
2017-01-16
publisher
atool
tarball
34,923 B
AUTO-PUBLISHED·1 version indexed·latest published 2020-02-13
// 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· @1.0.0· no static-pattern hits
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
- @1.0.0··AUTO-PUBLISHED·publisher: atoolheuristic 75/100static flags 0llm benign (0.85) via ollamapublisher-multi-name-burst:5osv-flagged:MAL-2026-4159
→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
// offending code· no static-pattern hits
--- install scripts --- ### prepublishOnly npm run build --- package.json (entry) --- { "name": "xmorse", "officialName": "xmorse", "version": "1.0.0", "description": "xmorse is a pure javascript(~1.5 kb) library for encode / decode morse code messages, unicode supported.", "license": "MIT", "main": "lib/index.js", "module": "esm/index.js", "browser": "dist/xmorse.min.js", "types": "lib/index.d.ts", "files": [ "lib", "esm", "dist" ], "scripts": { "clean": "rimraf -rf lib esm dist", "lint-staged": "lint-staged", "test": "jest", "build:umd": "rimraf ./dist && rollup -c", "build:cjs": "rimraf ./lib && tsc --module commonjs --outDir lib", "build:esm": "rimraf ./esm && tsc --module ESNext --outDir esm", "build": "npm run build:cjs && npm run build:esm && npm run build:umd", "prepublishOnly": "npm run build" }, "keywords": [ "morse", "mor", "morse code", "morse encode", "morse decode", "unicode morse", "中文morse", "中文摩斯密码" ], "devDependencies": { "@commitlint/cli": "^8.2.0", "@types/jest": "^24.0.18", "casual": "^1.6.2", "husky": "^3.0.5", "jest": "^24.9.0", "jest-electron": "^0.1.7", "lint-staged": "^9.3.0", "prettier": "^1.18.2", --- index.js (entry) --- "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var decode_1 = require("./decode"); exports.decode = decode_1.decode; var encode_1 = require("./encode"); exports.encode = encode_1.encode; //# sourceMappingURL=index.js.map --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/xmorse.min.js (bundled) --- !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e=e||self).xmorse={})}(this,function(e){"use strict";var c=function(){return(c=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)};var i={A:"01",B:"1000",C:"1010",D:"100",E:"0",F:"0010",G:"110",H:"0000",I:"00",J:"0111",K:"101",L:"0100",M:"11",N:"10",O:"111",P:"0110",Q:"1101",R:"010",S:"000",T:"1",U:"001",V:"0001",W:"011",X:"1001",Y:"1011",Z:"1100",0:"11111",1:"01111",2:"00111",3:"00011",4:"00001",5:"00000",6:"10000",7:"11000",8:"11100",9:"11110",".":"010101",",":"110011","?":"001100","'":"011110","!":"101011","/":"10010","(":"10110",")":"101101","&":"01000",":":"111000",";":"101010","=":"10001","+":"01010","-":"100001",_:"001101",'"':"010010",$:"0001001","@":"011010"},p=function(e){var r={};for(var n in e)r[e[n]]=n;return r}(i),s={space:"/",short:".",long:"-"};e.decode=function(e,r){var n=c(c({},s),r),t=n.space,o=n.short,a=n.long;return e.split(t).map(function(e){var r,n=e.replace(/\s+/g,"").replace(new RegExp("\\"+o,"g"),"0").replace(new RegExp("\\"+a,"g"),"1"),t=p[n];return t||(r=n,r=parseInt(r,2),t=isNaN(r)?"":unescape("%u"+r.toString(16))),t}).join("")},e.encode=function(e,r){var n=c(c({},s),r),t=n.space,o=n.short,a=n.long;return e.replace(/\s+/g,"").toLocaleUpperCase().split("").map(function(e){var r=i[e];return(r=r||function(e){for(var r=[],n=0;n<e.length;n++)r[n]=("00"+e.charCodeAt(n).toString(16)).slice(-4);var t=r.join("");return t=parseInt(t,16).toString(2)}(e)).replace(/0/g,o).replace(/1/g,a)}).join(t)},Object.defineProperty(e,"__esModule",{value:!0})});
