🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

micro-packed

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micro-packed - npm Package Compare versions

Comparing version

to
0.3.2

2

index.d.ts

@@ -169,3 +169,3 @@ import * as base from '@scure/base';

export declare function constant<T>(c: T): CoderType<T>;
export declare function struct<T>(fields: StructRecord<T>): CoderType<StructInput<T>>;
export declare function struct<T extends Record<string, any>>(fields: StructRecord<T>): CoderType<StructInput<T>>;
export declare function tuple<T extends ArrLike<CoderType<any>>, O = Writable<{

@@ -172,0 +172,0 @@ [K in keyof T]: UnwrapCoder<T[K]>;

@@ -735,3 +735,5 @@ import * as base from '@scure/base';

export function struct<T>(fields: StructRecord<T>): CoderType<StructInput<T>> {
export function struct<T extends Record<string, any>>(
fields: StructRecord<T>
): CoderType<StructInput<T>> {
if (Array.isArray(fields)) throw new Error('Packed.Struct: got array instead of object');

@@ -738,0 +740,0 @@ return wrap({

{
"name": "micro-packed",
"version": "0.3.1",
"version": "0.3.2",
"description": "Less painful binary encoding / decoding",

@@ -31,3 +31,3 @@ "files": [

"devDependencies": {
"micro-should": "0.2.0",
"micro-should": "0.4.0",
"prettier": "2.6.2",

@@ -34,0 +34,0 @@ "typescript": "4.7.3"

@@ -8,2 +8,8 @@ # micro-packed

Comes with an separate [debugger package](./debugger/).
## Usage
> npm install micro-packed
```ts

@@ -10,0 +16,0 @@ import * as P from 'micro-packed';

Sorry, the diff of this file is not supported yet