Registry / type-stubs / drapcode-utility

drapcode-utility

JSON →
library2.6.6jsnpmunverified

A utility library for DrapCode containing constants, logging, and general helpers. Current stable version is 2.6.6. The package provides a set of reusable functions and constants aimed at simplifying DrapCode development. It includes TypeScript definitions. It is a lightweight, focused tool for internal DrapCode projects, with no major alternatives mentioned.

npm install drapcode-utility
INSTALL
IMPORT
SIG · DRAPCODE-UTILITY
D
drapcode-utility
type-stubsjavascriptv2.6.6
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import drapcode from 'drapcode-utility'
const drapcode = require('drapcode-utility')
The package is ESM-only. CommonJS require() will fail.
Logger
import { Logger } from 'drapcode-utility'
import Logger from 'drapcode-utility'
Named export, not default export.
constant
import { constant } from 'drapcode-utility'
type Helper
import type { Helper } from 'drapcode-utility'
import { Helper } from 'drapcode-utility'
Use type-only import for TypeScript to avoid runtime overhead.

Demonstrates importing and using the Logger class from DrapCode Utility.

import { Logger } from 'drapcode-utility'; const logger = new Logger(); logger.info('Hello DrapCode!');
Debug
Known issues
gotchaESM only: The package provides only ES modules. Using require() will result in an error.
fix
Use import statements instead of require().
affects: >=2.0.0
gotchaNamed exports only: All exports are named; there is no default export.
fix
Import using named import syntax, e.g., import { Logger } from 'drapcode-utility'.
affects: >=2.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM: require() of ES Module not supported
Attempting to use CommonJS require() on an ESM-only package.
fix
Change to import statement or set type: 'module' in package.json.
Cannot find module 'drapcode-utility' or its corresponding type declarations.
Missing or misconfigured TypeScript module resolution.
fix
Ensure tsconfig.json includes 'drapcode-utility' in types or node_modules.
Upgrade
Version history
2.6.6latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
33 hits · last 30 days
node
30
OpenAI (training)
1
Resources
drapcode-utility — npm install drapcode-utility · libregistry