Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
HighCheers2605
✓ import { HighCheers2605 } from 'popn-db-js'
✗ const { HighCheers2605 } = require('popn-db-js')
ESM import is preferred; CJS require works via default export containing all named exports.
PopnDb default
✓ import PopnDb from 'popn-db-js'
✗ const PopnDb = require('popn-db-js').default
Default import is an object with all datecode-specific prefixes as properties.
Chart type
✓ import type { Chart } from 'popn-db-js'
Types are exported; use 'import type' for TypeScript type-only imports.
Demonstrates importing a version-specific module, querying charts by folder and level, and inspecting chart properties.
import { HighCheers2605 } from 'popn-db-js'
// Sample 5 charts from folder 27, level 45
const charts = HighCheers2605.sampleQueriedCharts({ count: 5, query: 'folder=27,lv=45' })
console.log(charts)
// Each chart has id, title, difficulty, level, notes, etc.
Debug
Known issues
breakingVersion 0.21.x: Potential breaking changes in query string syntax compared to earlier 0.x versions.fixReview query parameters for your version; use docs from GitHub releases.
affects: >=0.16.0 <0.21.0
gotchaCJS require('popn-db-js') returns a default object with version-specific classes as properties; destructuring named exports does not work directly.fixUse require('popn-db-js').HighCheers2605 or use ESM import. affects: >=0.0.0
deprecatedOlder datecode formats (e.g., 'Unilab2024073100') may be removed in future versions.fixUse the latest datecode-specific export like 'HighCheers2605'.
affects: >=0.21.0
gotchaChart data is read-only; mutations on returned objects may not persist or cause unexpected behavior.fixTreat chart objects as immutable; copy if modification is needed.
affects: >=0.0.0
gotchaQuery syntax (e.g., 'folder=27,lv=45') relies on a specific format; invalid queries may throw or return empty results without clear error.fixEnsure query is formatted as 'key=value' pairs separated by commas, matching available fields.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'popn-db-js'
Package not installed or incorrect import path.
fixRun 'npm install popn-db-js' (This package has not been published to npm yet, so use git dependency.)
TypeError: HighCheers2605.sampleQueriedCharts is not a function
Importing incorrectly (e.g., destructuring named exports from CJS require).
fixUse ESM import: import { HighCheers2605 } from 'popn-db-js' Error: Invalid query syntax
Query string does not follow expected format (e.g., missing equals or comma).
fixEnsure query is like 'folder=27,lv=45' with no spaces and correct field names.
Audit
Dependencies
No dependency data recorded yet.