</>PackageGraphPackageGraph

sax

npmv1.6.1

An evented streaming XML parser in JavaScript

Safe to adopt

Yes — sax scores well across adoption, maintenance, weight, supply chain, and licensing. 78.9M downloads per week and 2 known dependents. Last published 47 days ago. 6 releases in the last 2 years.

  • AAdoption: grade A, Excellent.

    78.9M downloads per week and 2 known dependents.

  • AMaintenance: grade A, Excellent.

    Last published 47 days ago. 6 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 60 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    BlueOak-1.0.0 — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding sax to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

60 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
node >=11.0.0
Module format
CommonJS only
TypeScript
No bundled types
Install scripts
None

Quick start

A usage example from the sax README.

javascriptFull README ↗
var sax = require('./lib/sax'),
  strict = true, // set to false for html-mode
  parser = sax.parser(strict)

parser.onerror = function (e) {
  // an error happened.
}
parser.ontext = function (t) {
  // got some text.  t is the string of text.
}
parser.onopentag = function (node) {
  // opened a tag.  node has "name" and "attributes"
}
parser.onattribute = function (attr) {
Example truncated — see the full README.

Dependencies

Declared by sax v1.6.1. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (2)

prettier ^3.6.2tap ^21.1.3

Used by

Popular packages that depend on sax.

Relationship graph

Dependencies (left) and dependents (right) of sax.

stylusxml2jssax
sax dependencies dependents

Frequently installed together

Release history

6 releases in the last two years, typically about 52 days apart.

Recent versions of sax
VersionPublishedSizeLicense
1.6.1latest1 month ago60 KBBlueOak-1.0.0
1.6.05 months ago60 KBBlueOak-1.0.0
1.5.06 months ago56 KBBlueOak-1.0.0
1.4.48 months ago55 KBBlueOak-1.0.0
1.4.310 months ago55 KBBlueOak-1.0.0
1.4.210 months ago55 KBBlueOak-1.0.0
1.4.12 years ago55 KBISC
1.4.02 years ago55 KBISC
1.3.02 years ago54 KBISC
1.2.49 years agoISC
1.2.39 years agoISC
1.2.29 years agoISC
1.2.110 years agoISC
1.1.610 years agoISC
1.1.510 years agoISC

Overview

sax is an npm package that an evented streaming XML parser in JavaScript. It is extremely widely used, with about 78.9M downloads per week and 2 known dependents in the graph. The latest version is 1.6.1, released under the BlueOak-1.0.0 license.

Who should use it

Teams working in the npm ecosystem who need an evented streaming XML parser in JavaScript and value a battle-tested, widely-adopted solution.

When not to use it

Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.

Pros

  • Large, well-established user base (78.9M weekly downloads).
  • Clear open-source license (BlueOak-1.0.0).
  • Lean dependency tree (2 direct dependencies).

Cons

  • No bundled TypeScript types (may require a separate @types package).

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Frequently asked questions

Should I use sax?

Yes — sax scores well across adoption, maintenance, weight, supply chain, and licensing. 78.9M downloads per week and 2 known dependents. Last published 47 days ago. 6 releases in the last 2 years.

How do I install sax?

Run `npm install sax` to add sax to your npm project.

What license is sax released under?

sax is distributed under the BlueOak-1.0.0 license.

How popular is sax?

sax has approximately 78,878,411 downloads per week and 2 known dependent packages.

Is sax still maintained?

The most recent release of sax (v1.6.1) was published 1 month ago.

Does sax run install scripts?

No. sax does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.