Là một dự án mã nguồn mở, mcollina/msgpack5 đã đạt 499 sao trên GitHub, ngôn ngữ JavaScript. A msgpack v5 implementation for node.js, with extension points / msgpack.org[Node]
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Creates a new instance on which you can register new types for being
encoded.
options:
forceFloat64, a boolean to that forces all floats to be encoded as 64-bits floats. Defaults to false.
sortKeys, a boolean to force a determinate keys order
compatibilityMode, a boolean that enables "compatibility mode" which doesn't use bin format family and str 8 format. Defaults to false.
disableTimestampEncoding, a boolean that when set disables the encoding of Dates into the timestamp extension type. Defaults to false.
preferMap, a boolean that forces all maps to be decoded to Maps rather than plain objects. This ensures that decode(encode(new Map())) instanceof Map and that iteration order is preserved. Defaults to false.
maxArrayLength, a non-negative integer that limits the number of elements in a decoded array. Arrays over the limit throw a RangeError. Defaults to no limit beyond the MessagePack format maximum.
maxMapLength, a non-negative integer that limits the number of entries in a decoded map. Maps over the limit throw a RangeError. Defaults to no limit beyond the MessagePack format maximum.
protoAction, a string which can be error|ignore|remove that determines what happens when decoding a plain object with a __proto__ property which would cause prototype poisoning. error (default) throws an error, remove removes the property, ignore (not recommended) allows the property, thereby causing prototype poisoning on the decoded object.
encode(object)
Encodes object in msgpack, returns a bl.
decode(buf)
Decodes buf from in msgpack. buf can be a Buffer or a bl instance.
In order to support a stream interface, a user must pass in a bl instance.
registerEncoder(check(obj), encode(obj))
Register a new custom object type for being automatically encoded.
The arguments are:
check, a function that will be called to check if the passed
object should be encoded with the encode function
encode, a function that will be called to encode an object in binary
form; this function must return a Buffer which include the same type
for registerDecoder.
registerDecoder(type, decode(buf))
Register a new custom object type for being automatically decoded.
The arguments are:
type, is a greater than zero integer identificating the type once serialized
decode, a function that will be called to decode the object from
the passed Buffer
Register a new custom object type for being automatically encoded and
decoded. The arguments are:
type, is a greater than zero integer identificating the type once serialized
constructor, the function that will be used to match the objects
with instanceof
encode, a function that will be called to encode an object in binary
form; this function must return a Buffer that can be
deserialized by the decode function
decode, a function that will be called to decode the object from
the passed Buffer
This is just a commodity that calls
registerEncoder and
registerDecoder internally.
encoder(options)
Builds a stream in object mode that encodes msgpack.
Supported options:
wrap, objects should be passed to encoder in wrapped object {value: data}. Wrap option should be used if you need to pass null to encoder.
decoder(options)
Builds a stream in object mode that decodes msgpack.
Supported options:
wrap, decoded objects returned in wrapped object {value: data}. Wrap option should be used if stream contains msgpack nil.
LevelUp Support
msgpack5 can be used as a LevelUp
valueEncoding straight away:
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/mcollina/msgpack5 là nguồn chính thức.
mcollina/msgpack5 có bao nhiêu sao?
mcollina/msgpack5 có 499 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/mcollina/msgpack5. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
mcollina/msgpack5 có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho mcollina/msgpack5. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
mcollina/msgpack5 có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho mcollina/msgpack5. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
mcollina/msgpack5 còn đang phát triển không?
Commit gần nhất trên mcollina/msgpack5 là 6 ngày trước (theo timestamp GitHub). Repo có 77 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
mcollina/msgpack5 dùng license gì?
mcollina/msgpack5 phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
mcollina/msgpack5 viết bằng ngôn ngữ gì?
mcollina/msgpack5 chủ yếu viết bằng JavaScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về msgpack5?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về msgpack5.