
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
legoino-util
Advanced tools
Create and parse compact logs.
$ npm install legoino-util
'use strict';
const { createCompactLog } = require('legoino-util');
let result = createCompactLog(
{
id: 65535,
epoch: 32767,
parameters: {
A: 1,
B: 2,
C: 3,
D: 4
},
eventId: 5,
eventValue: 6,
deviceId: 0xaaaa - 65536
},
4
);
// result is a string with value '0000FFFF00007FFF000100020003000400050006AAAA87'
'use strict';
const { parseCurrentSettings } = require('legoino-util');
let result = parseCurrentSettings('0000FFFF00007FFF000100020003000400050006AAAA87');
// result is a JSON (object)
Parse many lines of logs in one go. The lines must be separated by carriage returns.
'use strict';
const { parseMultilog } = require('legoino-util');
var multilog = `
000100005B77EFBE0046000E003800000000000000000013000C00060000005100010011004080000000000004D242
000100015B77EFC10046000E003800000000000000000044003200100000002000020011004080000000000004D231
000100025B77EFC40047000E00380000000000020002002F0024000A0000003500010011004080000000000004D247
`
let result = parseMultilog(multilog);
// result is a JSON (array of objects)
FAQs
Create and parse compact logs.
We found that legoino-util demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.