Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@swim/collections

Package Overview
Dependencies
Maintainers
3
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swim/collections

Immutable, structure sharing collections, including B-trees and S-trees (sequence trees)

  • 4.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
81
increased by9.46%
Maintainers
3
Weekly downloads
 
Created
Source

Swim Swim Collections Library

The Swim Collections library implements immutable, structure sharing collections, including B-trees and S-trees (sequence trees).

Overview

B-trees

The BTree class implements the OrderedMap interface from @swim/util, and compares keys using Objects.compare, also from @swim/util. BTree is internally immutable, enabling lightweight snapshotting via BTree.clone, and non-destructive mutation via BTree.updated, and BTree.removed.

BTree also implements the ReducedMap interface from @swim/util, providing storage of sub-tree reductions in b-tree nodes to support log time recomputation of whole tree reductions after incremental updates.

S-trees

The STree class implements a sequential list data type that's backed by an implicitly indexed b-tree. Like BTree, STree supports lightweight snapshotting via STree.clone.

STree associated a unique ID with each list item, which can be used to reconcile concurrent, conflicting updates to the same logical list.

Keywords

FAQs

Package last updated on 09 Jun 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc