canirequire

canirequire › Dual (CommonJS + ESM) › aid-guard1

Is aid-guard1 ESM-only? Can you require() it?

aid-guard1

Latest version 2.7.35, published Mar 16, 2024. Markdown · JSON

Dual (CommonJS + ESM) Dual package — require() works on every Node.js version we test; import works too

aid-guard1 publishes both a CommonJS entry and a native ESM entry (ESM added in 2.7.35). require("aid-guard1") should work on every Node.js version the package supports; the runtime probe has not run for this version. import "aid-guard1" works alongside it.

What to do

  1. Nothing to change. require("aid-guard1") should work on every Node.js version the package supports; the runtime probe has not run for this version. import * as aidGuard1 from "aid-guard1" works alongside it; use named imports for what the ESM entry exports.
  2. TypeScript: types are bundled; install nothing extra.
Latest
2.7.35 (Mar 16, 2024)
Module format
Dual (CommonJS + ESM)
Last CommonJS version
2.7.35
Native ESM since
2.7.35
TypeScript types
Bundled
Node engines
not declared
Weekly downloads
315
License
MIT

Does aid-guard1@2.7.35 actually load? Runtime test results

Runtime probe pending for this version. The values below are what package.json declares; they are refreshed once the probe runs.

Runtimerequire("aid-guard1")import "aid-guard1"
Node.js 18✓ expected✓ expected
Node.js 20✓ expected✓ expected
Node.js 22✓ expected✓ expected
Node.js 24✓ expected✓ expected
Node.js 26✓ expected✓ expected
Bun 1.4.0pendingpending

Install failed in our sandbox: error: No version matching "^43.6.35" found for specifier "material-balance-trade-solar" (but package exists) The rows above show what package.json declares.

How to import aid-guard1

ES modules (import)

import * as aidGuard1 from "aid-guard1";

Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.

CommonJS (require)

const aidGuard1 = require("aid-guard1");

Module format by version

Derived from the type, main and exports fields of every stable release on npm, corrected where a runtime test of that version contradicted them (1 versions; the newest 1 shown).

VersionsFormatFirst published
2.7.35Dual (CommonJS + ESM)Mar 16, 2024

Frequently asked

Is aid-guard1 ESM-only?

aid-guard1@2.7.35 ships CommonJS and ESM builds. aid-guard1 publishes both a CommonJS entry and a native ESM entry (ESM added in 2.7.35). require("aid-guard1") should work on every Node.js version the package supports; the runtime probe has not run for this version. import "aid-guard1" works alongside it.

Can I require aid-guard1?

Yes. aid-guard1 ships a CommonJS entry alongside the native ESM entry. require("aid-guard1") should work on every Node.js version the package supports; the runtime probe has not run for this version.

Does aid-guard1 ship TypeScript types?

Yes. aid-guard1 bundles its own type declarations; no @types package is needed.

Links

Other dual (commonjs + esm) packages

Similar popularity