npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@es-joy/jsoe

v0.15.0

Published

Editing of arbitrary JavaScript objects

Downloads

33

Readme

@es-joy/jsoe

JavaScript Object Editor.

Editing of arbitrary JavaScript objects.

See a demo of this tool or a demo of an app using this tool.

Formats

Formats are a collection of allowed types.

Supported formats include:

  • Structured Cloning (using typeson) (e.g., IndexedDB)
  • JSON
  • IndexedDB keys

Fundamental types

These are generally atomic types which correlate to JavaScript language structures.

Supported types include:

  • Array reference (for cyclic arrays)
  • Array
  • BigInt
  • Blob
  • Boolean object
  • Date
  • DOMException,
  • Error
  • TypeError, RangeError, SyntaxError, ReferenceError, EvalError, URIError, AggregateError, InternalError
  • File
  • FileList
  • Map
  • Non-editable type (catch-all for not-yet-supported object types; allows for preexisting data to be passed on transparently)
  • null
  • Number object
  • number
  • Object reference (for cyclic objects)
  • Object
  • RegExp
  • Set
  • String object
  • string
  • undefined

Subtypes

These map to a subset of JavaScript language structures. Note that false and true were common and limited enough in number to justify their own subtype for the sake of having a quick pull-down entry.

Supported subtypes include:

  • Blob (text/html)
  • false
  • true

Supertypes

These are collections of individual types, justified by the subitems not being so frequent as to necessitate their own separate enumeration.

Supported supertypes include:

  • Special Real Number (Infinity, -Infinity, -0) - Used with IndexedDB keys (even though -0 apparently to be converted to 0)
  • Special Number (Infinity, -Infinity, -0, NaN) - Used with Structured Cloning values
  • DOMMatrix (also includes DOMMatrixReadOnly)
  • DOMPoint (also includes DOMPointReadOnly)
  • DOMRect (also includes DOMRectReadOnly)
  • buffersource includes ArrayBuffer, DataView, and TypedArrays (int8array, uint8array, uint8clampedarray, int16array, uint16array, int32array, uint32array, float32array, float64array, bigint64array, biguint64array)

Known issues

  • Cannot provide maps with object keys pointing to the same objects as used as map values; likewise with Sets?
  • Certain cyclical structures may have issues
  • typeson-registry's structured cloning should throw on more objects, so bad data doesn't end up stored
  • Lacks support for certain Structured Cloning types. See to-dos below.

To-dos

  1. Add tests of demo (lower priority as have tests in idb-manager)
  2. Support Schemas based on a JSON serialization of Zod
  3. Expand fundamental types
    1. Not in typeson-registry
      1. Structured Cloning
        1. Web/API types (besides those listed below)
          1. See https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm#webapi_types
    2. Already in typeson-registry
      1. Structured Cloning
        1. (JavaScript types already complete)
        2. Web/API types
          1. imagedata, imagebitmap
          2. cryptokey
          3. domquad
        3. Our own custom derivative types? (e.g., MIDI using TypedArray)
  4. Expand subtypes
    1. String
      1. As supported by Zod, JSON Schema, etc. (e.g., email addresses as subtype of string, color as a subtype of string)
    2. File/Blob
      1. Drawing image for image/png, etc. File's
      2. Drawing SVG program for application/svg File
      3. JS/CSS/HTML/XML/Markdown/JSON/CSV/text text editor (including syntax highlighting in view mode); with text-to-speech
      4. OCR (TextDetector API if implemented) added as image pop-up utility
  5. Might put views and data into separate repos
  6. Implement as Custom Elements?
  7. Add drag-and-drop support for File type
  8. Import CSV as array