New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node_py_struct

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node_py_struct

使用 ts 版的 nodejs 复刻 python 中的 struct

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

使用 ts 版 nodejs 复刻 python 中的 struct, 目前只支持 pack,unpack,calcsize 方法

使用 gpt5 辅助生成

install

npm install node_py_struct

使用方法

function pack(format: string, ...values: any[]): Buffer;

function unpack(fmt: string, buffer: Buffer | ArrayBuffer | Uint8Array | DataView): any[];

function calcsize(fmt: string): number;

demo

import struct from "node_py_struct";
struct.pack("<i", 123, Buffer.from([3,4,5]));

Keywords

pack

FAQs

Package last updated on 29 Aug 2025

Did you know?

Socket

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.

Install

Related posts