🛠️construct-js is a library for creating byte level data structures.

Overview

construct-js

construct-js is a library for creating byte level data structures.

npm i construct-js

Features

  • Signed and unsigned fields, up to 64-bit
  • Nested structs
  • Pointer and SizeOf fields
  • Different struct alignments, up to 64-bit, including packed structs. Padding can be added before or after the data
  • Ability to specify endianness per field
  • String support - both raw and null-terminated
  • Outputs to the standard Uint8Array type, which can be used in the browser and node
  • Getting and setting data in fields
  • Fast computation for the size of a field or complete struct
  • Written in TypeScript - providing static typing in both JS and TS (dependant on editor support)
  • Less than 3.5KiB after minification and gzip

Table of contents

High Level Overview

construct-js is all about creating a low-cost and performant abstraction for working with structured, binary data. If you've ever found yourself trying to manually assemble binary data in an ArrayBuffer - stuffing data, calculating sizes, scratching your head over endianness and offsets, then this is likely the tool for you.

construct-js allows you to specify and manipulate binary data using an expressive API made up of standard primitives that you may be used to in lower level languages - such as structs, pointers, sizeof operators, and standard sized signed and unsigned integer types.

Why?

Why not? I mean - I think there is genuine utility, but even if there wasn't, it would simply be an interesting project to undertake.

In terms of actual utility, as the web and distributed services evolve, web pages and JavaScript are taking on increasing more diverse and complex task, as well as connecting to more elaborate and varied services. Typically communication channels between different services use simple interchange formats like JSON over HTTP or WebSockets, but for a variety of reasons this is not always ideal. A large part of the reason this is so widespread is that JavaScript traditionally hasn't had good facilities or abstractions for creating byte-level data structures. Now, however, with the advent and standardisation of Typed Arrays and BigInt, this is no longer the case. construct-js allows developers to write expressive descriptions using standard native types like numbers, strings, and regular arrays - and outputs to an efficient Uint8Array format for interchange with the network, filesystem, or even across execution environments like WebAssembly.

Examples

There are more examples in the examples folder, showing the some more possibilities - including array fields, explicit endianness, etc.

The following example builds a (just about) valid* zip archive with one file inside - helloworld.txt.

*At least when unzipped using the unzip command. Some GUI programs seem to have less success

import * as fs from 'fs/promises';
import {RawString, U16, U32, Struct, Pointer32, Endian} from 'construct-js';

const data = RawString('helloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworld');
const dataSize = data.computeBufferSize();
const filename = RawString('helloworld.txt');
const filenameSize = filename.computeBufferSize();

// Create a stub for the top level struct that can be referenced by other structs
const zipFile = Struct('ZipFile');

const sharedHeaderInfo = Struct('sharedHeaderInfo')
  .field('minVersion', U16(10))
  .field('gpFlag', U16(0))
  .field('compressionMethod', U16(0))
  .field('lastModifiedTime', U16(0))
  .field('lastModifiedDate', U16(0))
  .field('crc32', U32(0))
  .field('compressedSized', U32(dataSize))
  .field('uncompressedSized', U32(dataSize))
  .field('filenameSize', U16(filenameSize))
  .field('extraFieldLength', U16(0));

const localHeader = Struct('localHeader')
  .field('header', U32(0x04034b50))
  .field('sharedHeaderInfo', sharedHeaderInfo)
  .field('filename', filename);

const centralDirectory = Struct('centralDirectory')
  .field('header', U32(0x02014b50))
  .field('madeByVersion', U16(10))
  .field('sharedHeaderInfo', sharedHeaderInfo)
  .field('fileCommentSize', U16(0))
  .field('diskNumber', U16(0))
  .field('internalFileAttributes', U16(0))
  .field('externalFileAttributes', U32(0))
  .field('relativeOffset', U32(0))
  .field('filename', filename);

const endOfCentralDirectory = Struct('endOfCentralDirectory')
  .field('header', U32(0x06054b50))
  .field('diskNumber', U16(0))
  .field('centralDirDiskStart', U16(0))
  .field('numberOfCentralDirsOnDisk', U16(1))
  .field('totalNumberOfCentralDirs', U16(1))
  .field('centralDirSize', U32(0))
  .field('offsetToStart', Pointer32(zipFile, 'centralDirectory'))
  .field('commentLength', U16(0));

// Finalise the top level struct
zipFile
  .field('localHeader', localHeader)
  .field('data', data)
  .field('centralDirectory', centralDirectory)
  .field('endOfCentralDirectory', endOfCentralDirectory);

const fileBuffer = zipFile.toUint8Array();

fs.writeFile('./test.zip', fileBuffer).then(() => {
  console.log('Done writing zip file.');
});

Changelog

1.0.0

  • Full rewrite in TypeScript
  • Added 64-Bit support
  • Added alignment support
  • Breaking changes with the pre 1.0.0 releases

0.7.0

  • Add TypeScript definition file

0.6.1

  • Add .value() method to fields.

0.6.0

  • Refactor the user-facing API to remove endianness flags in fields and instead create a field for little endian and big endian variations.

0.5.0

  • Added NullTerminatedString field
  • Fixed a bug in getDeep that allowed requesting nonsense values in the path

0.4.2

  • Added Pointer8, Pointer16, Pointer32, SizeOf8, SizeOf16 and SizeOf32 fields

0.4.0

  • Removed concept of endianness from Structs. All endianness information comes directly from the Fields themselves
  • Removed deprecated Fields
  • Renamed I8, I16, I32, I8s, I16s, I32s -> S8, S16, S32, S8s, S16s, S32s

0.3.0

  • Allow the bit ordering to be specified for BitStructs

API

Struct

Struct(name: string, alignment = StructAlignment.Packed, paddingDirection = AlignmentPadding.AfterData)

Creates a Struct object. alignment specifies how much (if any) padding should be applied to the fields in order for them to align to a fixed byte boundary. paddingDirection specifies where the extra bytes should be added (before or after the data).

field

.field(name: string, value: ConstructDataType)

Adds a field to the struct. name is used to lookup the field using methods like struct.get(name). value must be either a Struct or one of the other data types provided by construct-js.

get

.get (name: string)

Returns the field with that name. Note: When using TypeScript, this value must be cast to the correct type, either using the generic or with the as keyword:

const s = Struct('example').field('first', U8(0));

s.get<DataType<typeof U8>>('first');

getOffset

.getOffset(name: string)

Returns the byte offset within the struct of the field with that name.

getDeep

.getDeep(path: string)

Returns the field within multiple structs, where path is a . separated string. Note: When using TypeScript, this value must be cast to the correct type, either using the generic or with the as keyword:

const struct = Struct('firstStruct')
  .field('aRawString', RawString('ABC'));

const struct2 = Struct('secondStruct')
  .field('deeperStruct', struct);

struct2.getDeep<DataType<RawString>>('deeperStruct.aRawString');

getDeepOffset

.getDeepOffset(path: string)

Returns the byte offset within multiple structs, where path is a . separated string.

computeBufferSize

.computeBufferSize()

Returns the size of the struct in bytes.

toUint8Array

.toUint8Array()

Returns a Uint8Array representation of the Struct.

Fields

Field Interfaces

Fields implement the IField interface, and optionally the IValue interface:

IField
interface IField {
  computeBufferSize(): number;
  toUint8Array(): Uint8Array;
}
IValue
interface IValue<T> {
  set(value: T): void;
  get(): T;
}

U8

U8(value: number) implements IField, IValue

A single 8-bit unsigned value.

U16

U16(value: number, endian = Endian.Little) implements IField, IValue

A single 16-bit unsigned value, in either big or little endian byte order.

U32

U32(value: number, endian = Endian.Little) implements IField, IValue

A single 32-bit unsigned value, in either big or little endian byte order.

U64

U64(value: bigint, endian = Endian.Little) implements IField, IValue

A single 64-bit unsigned value, in either big or little endian byte order. Note: Values for 64-bit fields must be specified as bigint.

I8

I8(value: number) implements IField, IValue

A single 8-bit signed value.

I16

I16(value: number, endian = Endian.Little) implements IField, IValue

A single 16-bit signed value, in either big or little endian byte order.

I32

I32(value: number, endian = Endian.Little) implements IField, IValue

A single 32-bit signed value, in either big or little endian byte order.

I64

I64(value: bigint, endian = Endian.Little) implements IField, IValue

A single 64-bit signed value, in either big or little endian byte order. Note: Values for 64-bit fields must be specified as bigint.

RawString

RawString(string) implements IField, IValue

A collection of 8-bit unsigned values, interpreted directly from the string provided.

NullTerminatedString

NullTerminatedString(string) implements IField, IValue

A collection of 8-bit unsigned values, interpreted directly from the string provided. This field appends a single 0x00 byte to the end of the data.

U8s

U8s(values: number[]) implements IField, IValue

A collection of 8-bit unsigned values.

U16s

U16s(values: number[], endian = Endian.Little) implements IField, IValue

A collection of 16-bit unsigned values, in either big or little endian byte order.

U32s

U32s(values: number[], endian = Endian.Little) implements IField, IValue

A collection of 32-bit unsigned values, in either big or little endian byte order.

U64s

U64s(values: bigint[], endian = Endian.Little) implements IField, IValue

A collection of 64-bit unsigned values, in either big or little endian byte order. Note: Values for 64-bit fields must be specified as bigint.

I8s

I8s(values: number[]) implements IField, IValue

A collection of 8-bit signed values.

I16s

I16s(values: number[], endian = Endian.Little) implements IField, IValue

A collection of 16-bit signed values, in either big or little endian byte order.

I32s

I32s(values: number[], endian = Endian.Little) implements IField, IValue

A collection of 32-bit signed values, in either big or little endian byte order.

I64s

I64s(values: bigint[], endian = Endian.Little) implements IField, IValue

A collection of 64-bit signed values, in either big or little endian byte order. Note: Values for 64-bit fields must be specified as bigint.

Pointer8

Pointer8(struct: Struct, path: string) implements IField

Pointer8 takes a Struct and a path, and represents an 8-bit pointer (offset) to the field specified by the path in the provided struct.

Pointer16

Pointer16(struct: Struct, path: string, endian = Endian.Little) implements IField

Pointer16 takes a Struct and a path, and represents an 16-bit pointer (offset) to the field specified by the path in the provided struct.

Pointer32

Pointer32(struct: Struct, path: string, endian = Endian.Little) implements IField

Pointer32 takes a Struct and a path, and represents an 32-bit pointer (offset) to the field specified by the path in the provided struct.

Pointer64

Pointer64(struct: Struct, path: string, endian = Endian.Little) implements IField

Pointer64 takes a Struct and a path, and represents an 64-bit pointer (offset) to the field specified by the path in the provided struct.

SizeOf8

SizeOf8(target: ConstructDataType) implements IField

SizeOf8 takes a Struct or a Field, and represents the size of the Struct or the Field as an 8-bit unsigned integer.

SizeOf16

SizeOf16(target: ConstructDataType, endian = Endian.Little) implements IField

SizeOf16 takes a Struct or a Field, and represents the size of the Struct or the Field as an 16-bit unsigned integer.

SizeOf32

SizeOf32(target: ConstructDataType, endian = Endian.Little) implements IField

SizeOf32 takes a Struct or a Field, and represents the size of the Struct or the Field as an 32-bit unsigned integer.

SizeOf64

SizeOf64(target: ConstructDataType, endian = Endian.Little) implements IField

SizeOf64 takes a Struct or a Field, and represents the size of the Struct or the Field as an 64-bit unsigned integer.

Comments
  • Ensure BitStructs are in expected (MSb to LSb) order

    Ensure BitStructs are in expected (MSb to LSb) order

    Creating a buffer from a BitStruct results in the fields being rendered in reverse from the order they were specified. getBits() on a MultiBit field also renders the bits in reverse order, but to add to the confusion when rendered as part of the BitStruct, the reversal is reversed, so it's the right way round :).

    Example:

    const mb = dz.BitStruct('bits')
          .flag('a', false)
          .flag('b', true)
          .multiBit('c', 4, 10)
    

    I would expect to render "left to right" a/b/c/[pad], so 0/1/1010/00, or 68 hex. The code as it stands generates 00/1010/1/0 (2a hex). Perhaps this is actually intentional, but seems a bit counterintuitive?

    This pull request fixes both those issues to produce fields in the order in which they are specified, and also refactors to fix a bug in the toBytes() method that had a undefined field bits

    Thanks for the library though, just what I'm needing :)

    opened by revbingo 4
  • "Word" size + naming

    Using a Word as 16-bits is a bit outdated and I think it can be more generalized + future proof. Is it possible to rename it to something like iWord16 or uWord32 to differentiate between signed and unsigned and specify the total number of bits being used?

    opened by Salil999 3
  • New uInt64 field

    New uInt64 field

    Would be great to have a Int64/uInt64-Field. We would read it from the database as a string that contains a 64-bit number (f.e. "9223372036854775807") and it is somehow converted into a 64 bit long buffer that contains the value 7FFF,FFFF,FFFF,FFFF.

    opened by Kauto 2
  • Use TS assertion signature to avoid type casting

    Use TS assertion signature to avoid type casting

    Starting from TS 3.7 it's possible to use so-called "assertion signatures" to narrow TS types after guard statements. It's described here: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#assertion-functions

    It allows to avoid type casting. For some reason assertion signatures are available only for function keyword, that's why I had replace const with function

    • [ ] This PR only introduces changes to documentation.
      • No
    • [ ] This PR adds new functionality
      • [ ] Is there a related issue?
        • No, it's just a an improvement utilizing latest TS features
      • [ ] Does the code style reasonably match the existing code?
        • Yes
      • [ ] Are the changes tested (using the existing format, as far as is possible?)
        • Yes
      • [ ] Are the changes documented in the readme with a suitable example?
        • Not needed
      • [ ] Is the table of contents updated?
        • Not needed
      • [ ] Is the index.d.ts file updated, using the same (or appropriately modified) description as in the readme?
        • Not needed
    opened by kubk 1
  • Fix computeBufferSize returning garbage due to destructuring

    Fix computeBufferSize returning garbage due to destructuring

    I observed that BitStruct was not working (returning [null]). On investigation the root cause was in computeBufferSize, where the destructuring was returning the size function, rather than the intended _size field - presumably due to a renaming at some point in time.

    This pull request fixes the destructuring in computeBufferSize and similar error in getOffset

    opened by revbingo 1
  • fromBuffer()?

    fromBuffer()?

    First, this looks amazing and is just what I need to keep my binary structs sane!

    Is there a `fromBuffer()? If I receive one of these in Buffer form, is there a way to load it into a Struct? I see a few get methods, but not any set ones.

    opened by drazisil 1
  • 1.0.1

    1.0.1

    • [ ] This PR only introduces changes to documentation.
      • Please include a summary of changes and an explanation
    • [ ] This PR adds new functionality
      • [ ] Is there a related issue?
        • Please note the related issue below, and how this PR relates to the issue if appropriate
      • [ ] Does the code style reasonably match the existing code?
      • [ ] Are the changes tested (using the existing format, as far as is possible?)
      • [ ] Are the changes documented in the readme with a suitable example?
      • [ ] Is the table of contents updated?
      • [ ] Is the index.d.ts file updated, using the same (or appropriately modified) description as in the readme?
    • [ ] This PR introduces some other kind of change
      • Please explain the change below
    opened by francisrstokes 0
  • Improve perf

    Improve perf

    • [ ] This PR only introduces changes to documentation.
      • Please include a summary of changes and an explanation
    • [ ] This PR adds new functionality
      • [ ] Is there a related issue?
        • Please note the related issue below, and how this PR relates to the issue if appropriate
      • [ ] Does the code style reasonably match the existing code?
      • [ ] Are the changes tested (using the existing format, as far as is possible?)
      • [ ] Are the changes documented in the readme with a suitable example?
      • [ ] Is the table of contents updated?
      • [ ] Is the index.d.ts file updated, using the same (or appropriately modified) description as in the readme?
    • [x] This PR introduces some other kind of change

    A pretty obvious improvement here - using an object to keep track of field names instead of an array. I noticed it was performing slowly on a pretty straightforward structure with thousands of fields, and realised it was spending a ton of time traversing arrays every time a field was added (and getting longer each time) 🤦‍♂️ No breaks in the user API, so this is just a nice "win".

    opened by francisrstokes 0
  • Complete rewrite in TypeScript and support for 64-bit fields

    Complete rewrite in TypeScript and support for 64-bit fields

    • [ ] This PR only introduces changes to documentation.
      • Please include a summary of changes and an explanation
    • [x] This PR adds new functionality
      • [ ] Is there a related issue?
        • To close #1
      • [x] Does the code style reasonably match the existing code?
      • [x] Are the changes tested (using the existing format, as far as is possible?)
      • [x] Are the changes documented in the readme with a suitable example?
      • [x] Is the table of contents updated?
      • [x] Is the index.d.ts file updated, using the same (or appropriately modified) description as in the readme?
    • [ ] This PR introduces some other kind of change
      • Please explain the change below
    opened by francisrstokes 0
  • Bump path-parse from 1.0.6 to 1.0.7

    Bump path-parse from 1.0.6 to 1.0.7

    Bumps path-parse from 1.0.6 to 1.0.7.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump glob-parent from 5.1.1 to 5.1.2

    Bump glob-parent from 5.1.1 to 5.1.2

    Bumps glob-parent from 5.1.1 to 5.1.2.

    Release notes

    Sourced from glob-parent's releases.

    v5.1.2

    Bug Fixes

    Changelog

    Sourced from glob-parent's changelog.

    5.1.2 (2021-03-06)

    Bug Fixes

    6.0.0 (2021-05-03)

    ⚠ BREAKING CHANGES

    • Correct mishandled escaped path separators (#34)
    • upgrade scaffold, dropping node <10 support

    Bug Fixes

    • Correct mishandled escaped path separators (#34) (32f6d52), closes #32

    Miscellaneous Chores

    • upgrade scaffold, dropping node <10 support (e83d0c5)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump flat from 4.1.0 to 5.0.2

    Bump flat from 4.1.0 to 5.0.2

    Bumps flat from 4.1.0 to 5.0.2.

    Commits
    • e5ffd66 Release 5.0.2
    • fdb79d5 Update dependencies, refresh lockfile, format with standard.
    • e52185d Test against node 14 in CI.
    • 0189cb1 Avoid arrow function syntax.
    • f25d3a1 Release 5.0.1
    • 54cc7ad use standard formatting
    • 779816e drop dependencies
    • 2eea6d3 Bump lodash from 4.17.15 to 4.17.19
    • a61a554 Bump acorn from 7.1.0 to 7.4.0
    • 20ef0ef Fix prototype pollution on unflatten
    • Additional commits viewable in compare view
    Maintainer changes

    This version was pushed to npm by timoxley, a new releaser for flat since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump minimist from 1.2.5 to 1.2.6

    Bump minimist from 1.2.5 to 1.2.6

    Bumps minimist from 1.2.5 to 1.2.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump pathval from 1.1.0 to 1.1.1

    Bump pathval from 1.1.0 to 1.1.1

    Bumps pathval from 1.1.0 to 1.1.1.

    Release notes

    Sourced from pathval's releases.

    v1.1.1

    Fixes a security issue around prototype pollution.

    Commits
    • db6c3e3 chore: v1.1.1
    • 7859e0e Merge pull request #60 from deleonio/fix/vulnerability-prototype-pollution
    • 49ce1f4 style: correct rule in package.json
    • c77b9d2 fix: prototype pollution vulnerability + working tests
    • 49031e4 chore: remove very old nodejs
    • 57730a9 chore: update deps and tool configuration
    • a123018 Merge pull request #55 from chaijs/remove-lgtm
    • 07eb4a8 Delete MAINTAINERS
    • a0147cd Merge pull request #54 from astorije/patch-1
    • aebb278 Center repo name on README
    • Additional commits viewable in compare view
    Maintainer changes

    This version was pushed to npm by chai, a new releaser for pathval since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Owner
Francis Stokes
Making Low Level JavaScript on YouTube. Creator of Arcsecond, super-expressive, construct-js.
Francis Stokes
ClojureScript's persistent data structures and supporting API from the comfort of vanilla JavaScript

mori A simple bridge to ClojureScript's persistent data structures and supporting APIs for vanilla JavaScript. Pull requests welcome. Breaking changes

David Nolen 3.4k Dec 31, 2022
A complete, fully tested and documented data structure library written in pure JavaScript.

Buckets A JavaScript Data Structure Library Buckets is a complete, fully tested and documented data structure library written in pure JavaScript. Incl

Mauricio 1.2k Jan 4, 2023
Immutable persistent data collections for Javascript which increase efficiency and simplicity.

Immutable collections for JavaScript Immutable data cannot be changed once created, leading to much simpler application development, no defensive copy

Immutable.js 32.4k Dec 31, 2022
Immutable persistent data collections for Javascript which increase efficiency and simplicity.

Immutable collections for JavaScript Immutable data cannot be changed once created, leading to much simpler application development, no defensive copy

Immutable.js 32.4k Jan 7, 2023
A simulation data generator

Mock.js Mock.js is a simulation data generator to help the front-end to develop and prototype separate from the back-end progress and reduce some mono

高云 墨智 18.7k Jan 4, 2023
mutate a copy of data without changing the original source

immutability-helper Mutate a copy of data without changing the original source Setup via NPM npm install immutability-helper --save This is a drop-in

Moshe Kolodny 5.1k Dec 29, 2022
JSON-Schema + fake data generators

Use JSON Schema along with fake generators to provide consistent and meaningful fake data for your system. What's next? Breaking-changes towards v0.5.

JSON Schema Faker 2.9k Jan 4, 2023
This project provides a CDK construct creating AWS organizations.

AWS Organizations This project provides a CDK construct creating AWS organizations. Currently, there is no @aws-cdk/aws-organizations available. See t

Pepperize 107 Dec 29, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
danfo.js is an open source, JavaScript library providing high performance, intuitive, and easy to use data structures for manipulating and processing structured data.

Danfojs: powerful javascript data analysis toolkit What is it? Danfo.js is a javascript package that provides fast, flexible, and expressive data stru

JSdata 4k Dec 29, 2022
Slide-element - A ~700 byte Promise-based library for animating elements with dynamic heights open & closed. Basically, a modern variant of jQuery's slideUp(), slideDown(), and slideToggle().

slide-element A tiny, accessible, Promise-based, jQuery-reminiscent library for sliding elements with dynamic heights open & closed. To see it in acti

Alex MacArthur 165 Dec 12, 2022
Create a schema object to encode/decode your JSON in to a compact byte buffer with no overhead.

schemapack The fastest and smallest JavaScript object serialization library. Efficiently encode your objects in to compact byte buffers and then decod

null 442 Nov 26, 2022
~900 byte minified CSV parser and builder. Smaller when compressed. Built in ESM only.

but-csv ~900 byte minified CSV parser and builder. Smaller when compressed. Built in ESM only. Doesn't care about headers, keyed rows, anything but st

Sam Thorogood 16 Nov 13, 2022
Halfwit is an experimental golfing language that fits most commands in half a byte.

Halfwit Halfwit is an experimental golfing language that fits most commands in half a byte. It's stack-based. Usage npm install halfwit

Chunkybanana 12 Jun 27, 2022
Dead simple, single file, tiny byte formatter

tiny-byte-size Dead simple, no configuration needed, tiny byte formatter npm install tiny-byte-size Usage const byteSize = require('tiny-byte-size')

Mathias Buus 17 Aug 24, 2022
The commercial Cheesgle Byte.

Cheesgle-Byte The commercial Cheesgle Byte. https://one.byte.cheesgle.com/ The LICENSE to this software is provided in the file marked LICENSE Contrib

coding398 7 Oct 20, 2022
Serialization library for data-oriented design structures in JavaScript

Data-oriented Serialization for SoA/AoA A zero-dependency serialization library for data-oriented design structures like SoA (Structure of Arrays) and

null 11 Sep 27, 2022
This is the team project of construct week unit-3 (js201)

This is the team project of construct week unit-3 (js201) I. Project's Title => Clone of Mytheresa.com (E-commerce website) II. Project Description =>

Brajesh Lovanshi 5 Sep 28, 2022