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

@bnaya/objectbuffer

Package Overview
Dependencies
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bnaya/objectbuffer

Object like api, backed by an array buffer

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
29
decreased by-81.76%
Maintainers
1
Weekly downloads
 
Created
Source

WIP - object like api backed by a single array buffer.

For Modern browsers and node. Zero direct dependencies.

"design" doc: https://docs.google.com/document/d/1-UlUyH3HgOrN58avyScZlfjQtfJxgVwK_yE35mQHpYw/edit?usp=sharing

Why?

Personal interest, Maybe will be useful as shared memory primitive, and communicating with wasm.

At the current state, it's working! but very optimized (based only on linked lists), only append data (no logic to reuse unreachable memory) and its not extending the backing arraybuffer size by itself. if you pass the limit, an exception will be thrown.
We still don't have ArrayBuffer.prototype.transfer So we can't do that efficiently.

Missing parts

  • array (Not sure yet if to make just make them as objects, or something smarter)
  • Date
  • Map On primitive key/value
  • Set On primitive values

What's working:

  • Kinda what ever that can do into JSON.stringify
  • objects!
  • other

What's not working yet, but can be:

  • bigint bigger than 64 bit

What's probably never going to work (convince me otherwise in an issue):

  • Anything that cannot go into JSON.stringify
  • Symbol
  • Circularities

Contribution / Collaboration

There's a huge place for optimizations, code hygiene, and features!
Feel free to open issues and maybe implementing missing parts

FAQs

Package last updated on 12 Sep 2019

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