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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rip-lang/rsx

v0.1.2

Published

Rip Style XML - small, safe XML parser/serializer that yields plain Rip objects

Readme

Rip RSX - @rip-lang/rsx

Rip Style XML — XML ⇄ Rip object, with security defaults that match what you want for SOAP and EDI envelopes

RSX is a small, forgiving XML parser and serializer for the cases where you want a Rip object, not a DOM. It's the modern replacement for the legacy csex.coffee (XML→CSON) helper: same idea, but built around a real scanner/tokenizer instead of nested regular expressions, and with security defaults appropriate for talking to outside systems.

What RSX gives you

  • A plain Rip object tree where repeated child tags collapse into arrays automatically.
  • Namespace prefixes stripped by default for ergonomic consumer code, with an opt-in mode to preserve them.
  • CDATA content preserved verbatim — never collapses whitespace inside, never escapes characters.
  • No XXE, no entity-expansion attacks — DOCTYPE rejected by default, only the five built-in entities decoded, custom <!ENTITY> declarations ignored.
  • Hard size cap (5 MB by default) so a hostile peer can't OOM you with a giant payload.

Quick Start

bun add @rip-lang/rsx
import { parse, stringify } from '@rip-lang/rsx'

obj = parse soapXml
obj.Envelope.Body.COREEnvelopeRealTimeRequest.Payload  # → X12 string

xml = stringify 'soapenv:Envelope', responseObj,
  indent: 2
  cdata: ['Payload']

API

parse(xml, opts?)               # XML string → Rip object
stringify(rootName, obj, opts?) # Rip object → XML string

parse options

| Option | Default | Notes | |---|---|---| | stripNamespaces | true | 'ns1:Foo''Foo' | | preserveCDATA | true | CDATA text is verbatim | | trimText | true | Collapse whitespace in non-CDATA text | | coerceNumbers | false | Never auto-coerce numbers — text stays text | | coerceBooleans | false | Never auto-coerce booleans | | attrsKey | '@attrs' | Grouped attribute key on each node | | textKey | '#text' | Mixed-content text key | | forceArray | null | Set, array, or function — force these tags to arrays | | preserveChildren | false | Emit @children in document order | | allowDoctype | false | DOCTYPE rejected by default | | allowProcessingInstructions | true | Tolerate <?xml ...?> by skipping | | maxBytes | 5 * 1024 * 1024 | Hard cap |

stringify options

| Option | Default | Notes | |---|---|---| | indent | '' | String or number of spaces | | newline | implicit | Newline character (defaults based on indent) | | cdata | null | Set or array of tag names whose content should be CDATA-wrapped | | attrsKey, textKey | match parse defaults | |

Object shape

<list>
  <item count="2">a</item>
  <item count="3">b</item>
</list>

becomes

{
  list:
    item: [
      { '@attrs': { count: '2' }, '#text': 'a' }
      { '@attrs': { count: '3' }, '#text': 'b' }
    ]
}

Elements with no attributes and only text collapse to scalars (<a>x</a>{ a: 'x' }).

What RSX does NOT do

  • Validate against a schema or DTD
  • Honor xmlns binding semantics — namespace prefixes are opaque labels
  • Round-trip mixed content (text and elements interleaved) unless you opt in via preserveChildren: true

Links