# validate-exports-object

> Validate an object in the "exports" field

Latest version **1.0.3** (published 2024-12-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install validate-exports-object
pnpm add validate-exports-object
yarn add validate-exports-object
bun add validate-exports-object
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2024-12-12 |
| First published | 2024-01-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 0.4 |
| Dependencies | 6 |
| Unpacked size | 24.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Jordan Harband |
| Maintainers | ljharb |
| Keywords | package.json, exports, validate, object |

## Links

- npm: https://www.npmjs.com/package/validate-exports-object
- Repository: https://github.com/ljharb/validate-exports-object
- Homepage: https://github.com/ljharb/validate-exports-object#readme
- Issues: https://github.com/ljharb/validate-exports-object/issues
- npm.io page: https://npm.io/package/validate-exports-object

## Dependencies (6)

- [isarray](https://npm.io/package/isarray.md) ^2.0.5
- [call-bind](https://npm.io/package/call-bind.md) ^1.0.8
- [call-bound](https://npm.io/package/call-bound.md) ^1.0.2
- [object-keys](https://npm.io/package/object-keys.md) ^1.1.1
- [safe-regex-test](https://npm.io/package/safe-regex-test.md) ^1.0.3
- [safe-array-concat](https://npm.io/package/safe-array-concat.md) ^1.1.2

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.3 (latest) — 2024-12-12
- 1.0.2 — 2024-03-09
- 1.0.1 — 2024-01-18
- 1.0.0 — 2024-01-16

## README

# validate-exports-object <sup>[![Version Badge][npm-version-svg]][package-url]</sup>

[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]

[![npm badge][npm-badge-png]][package-url]

Validate an object in the "exports" field.

## Example

```js
const assert = require('assert');
const validateExportsObject = require('validate-exports-object');
const pkg = require('./package.json');

const results = validateExportsObject(pkg.exports);

assert.deepEqual(
    results,
    {
        __proto__: null,
        normalized: {
            __proto__: null,
            '.': './index.js',
            './package.json': './package.json'
        },
        problems: [],
        status: 'files'
    }
);
```

## Tests
Simply clone the repo, `npm install`, and run `npm test`

## Security

Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.

[package-url]: https://npmjs.org/package/validate-exports-object
[npm-version-svg]: https://versionbadg.es/ljharb/validate-exports-object.svg
[deps-svg]: https://david-dm.org/ljharb/validate-exports-object.svg
[deps-url]: https://david-dm.org/ljharb/validate-exports-object
[dev-deps-svg]: https://david-dm.org/ljharb/validate-exports-object/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/validate-exports-object#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/validate-exports-object.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/validate-exports-object.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/validate-exports-object.svg
[downloads-url]: https://npm-stat.com/charts.html?package=validate-exports-object
[codecov-image]: https://codecov.io/gh/ljharb/validate-exports-object/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/validate-exports-object/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/validate-exports-object
[actions-url]: https://github.com/ljharb/validate-exports-object/actions

---
_Source: https://npm.io/package/validate-exports-object · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
