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

xx-err

v0.0.1

Published

XML errors

Readme

xx-err

npm npm build Coverage

XML errors:

  • FOAP0001: Wrong number of arguments.
  • FOAR0001: Division by zero.
  • FOAR0002: Numeric operation overflow/underflow.
  • FOAY0001: Array index out of bounds.
  • FOAY0002: Negative array length.
  • FOCA0001: Input value too large for decimal.
  • FOCA0002: Invalid lexical value.
  • FOCA0003: Input value too large for integer.
  • FOCA0005: NaN supplied as float/double value.
  • FOCA0006: String to be cast to decimal has too many digits of precision.
  • FOCH0001: Codepoint not valid.
  • FOCH0002: Unsupported collation.
  • FOCH0003: Unsupported normalization form.
  • FOCH0004: Collation does not support collation units.
  • FODC0001: No context document.
  • FODC0002: Error retrieving resource.
  • FODC0003: Function not defined as deterministic.
  • FODC0004: Invalid collection URI.
  • FODC0005: Invalid argument to fn:doc or fn:doc-available.
  • FODC0006: String passed to fn:parse-xml is not a well-formed XML document.
  • FODC0010: The processor does not support serialization.
  • FODF1280: Invalid decimal format name.
  • FODF1310: Invalid decimal format picture string.
  • FODT0001: Overflow/underflow in date/time operation.
  • FODT0002: Overflow/underflow in duration operation.
  • FODT0003: Invalid timezone value.
  • FOER0000: Unidentified error.
  • FOFD1340: Invalid date/time formatting parameters.
  • FOFD1350: Invalid date/time formatting component.
  • FOJS0001: JSON syntax error.
  • FOJS0003: JSON duplicate keys.
  • FOJS0004: JSON: not schema-aware.
  • FOJS0005: Invalid options.
  • FOJS0006: Invalid XML representation of JSON.
  • FOJS0007: Bad JSON escape sequence.
  • FONS0004: No namespace found for prefix.
  • FONS0005: Base-uri not defined in the static context.
  • FOQM0001: Module URI is a zero-length string.
  • FOQM0002: Module URI not found.
  • FOQM0003: Static error in dynamically-loaded XQuery module.
  • FOQM0005: Parameter for dynamically-loaded XQuery module has incorrect type.
  • FOQM0006: No suitable XQuery processor available.
  • FORG0001: Invalid value for cast/constructor.
  • FORG0002: Invalid argument to fn:resolve-uri().
  • FORG0003: fn:zero-or-one called with a sequence containing more than one item.
  • FORG0004: fn:one-or-more called with a sequence containing no items.
  • FORG0005: fn:exactly-one called with a sequence containing zero or more than one item.
  • FORG0006: Invalid argument type.
  • FORG0008: The two arguments to fn:dateTime have inconsistent timezones.
  • FORG0009: Error in resolving a relative URI against a base URI in fn:resolve-uri.
  • FORG0010: Invalid date/time.
  • FORX0001: Invalid regular expression flags.
  • FORX0002: Invalid regular expression.
  • FORX0003: Regular expression matches zero-length string.
  • FORX0004: Invalid replacement string.
  • FOTY0012: Argument to fn:data() contains a node that does not have a typed value.
  • FOTY0013: The argument to fn:data() contains a function item.
  • FOTY0014: The argument to fn:string() is a function item.
  • FOTY0015: An argument to fn:deep-equal() contains a function item.
  • FOUT1170: Invalid $href argument to fn:unparsed-text() (etc.)
  • FOUT1190: Cannot decode resource retrieved by fn:unparsed-text() (etc.)
  • FOUT1200: Cannot infer encoding of resource retrieved by fn:unparsed-text() (etc.)
  • FOXT0001: No suitable XSLT processor available.
  • FOXT0002: Invalid parameters to XSLT transformation.
  • FOXT0003: XSLT transformation failed.
  • FOXT0004: XSLT transformation has been disabled.
  • FOXT0006: XSLT output contains non-accepted characters.
  • XPST0003: Syntax error.

Usage:

npm install xx-err --save

const err = require('xx-err');

// ...

if (/*something wrong*/) err.XPST0003('Something went wrong...');

// - this throws the following Error:
// err:XPST0003, Syntax error. Something went wrong...
// see https://www.w3.org/TR/xpath-31/#ERRXPST0003

Arguments:

err.XPST0003(); err.XPST0003(str); err.XPST0003(obj); err.XPST0003(str, obj);

  • str - a string to be included in the error's message.
  • obj - additional data to attach to the error object.

e.g:

try {
  err.XPST0003('Oops!', { row: 2, col: 5 });
}
catch (e) {
  console.log(e.code); // XPST0003
  console.log(e.message);
  // err:XPST0003, Syntax error. Oops!
  // see https://www.w3.org/TR/xpath-31/#ERRXPST0003
  console.log(e.row);  // 2
  console.log(e.col);  // 5
}