Files
notification-elements-demo/node_modules/@jsonjoy.com/buffers/lib/printOctets.js
Giuliano Silvestro 5d0c9ec7eb Initial commit: notification-elements-demo app
Interactive Angular 19 demo for @sda/notification-elements-ui with
6 sections: Bell & Feed, Notification Center, Inbox, Comments &
Threads, Mention Input, and Full-Featured layout. Includes mock
data, dark mode toggle, and real-time event log.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 21:49:19 +10:00

23 lines
653 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.printOctets = void 0;
const printOctets = (octets, max = 16) => {
let str = '';
if (!octets.length)
return str;
if (octets[0] < 16)
str += '0';
str += octets[0].toString(16);
for (let i = 1; i < octets.length && i < max; i++) {
const n = octets[i];
str += ' ';
if (n < 16)
str += '0';
str += n.toString(16);
}
if (octets.length > max)
str += `… (${octets.length - max} more)`;
return str;
};
exports.printOctets = printOctets;
//# sourceMappingURL=printOctets.js.map