npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

validate-exports-object

1.0.3

@ljharb

npmHomeRepoSnykSocket
Downloads:63
$ npm install validate-exports-object
DailyWeeklyMonthlyYearly

validate-exports-object Version Badge

github actions coverage License Downloads

npm badge

Validate an object in the "exports" field.

Example

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 or see https://tidelift.com/security if you have a potential security vulnerability to report.