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.
URLBuilder
✓ import { URLBuilder } from '@gasbuddy/rest-api-support'
✗ const URLBuilder = require('@gasbuddy/rest-api-support').URLBuilder
ESM only; CommonJS require may break in some bundlers.
default
✓ import RestApiSupport from '@gasbuddy/rest-api-support'
✗ const RestApiSupport = require('@gasbuddy/rest-api-support')
The default export is not clearly documented; prefer named imports.
Module
✓ import * as RestApiSupport from '@gasbuddy/rest-api-support'
✗ const RestApiSupport = require('@gasbuddy/rest-api-support')
Namespace import works for accessing all exports.
Demonstrates building a URL using URLBuilder, setting path and query parameters.
import { URLBuilder } from '@gasbuddy/rest-api-support';
const urlBuilder = new URLBuilder('https://api.example.com');
const url = urlBuilder
.setPath('/users')
.setQueryParam('id', '123')
.build();
console.log(url); // https://api.example.com/users?id=123
Debug
Known issues
breakingVersion 2.0.0-beta introduces breaking changes; URLBuilder may differ from 1.x.fixRefer to migration guide on GitHub repository.
affects: >=2.0.0-beta <2.0.0
deprecatedSome older APIs may be deprecated in favor of new patterns.fixCheck changelog for deprecated symbols.
affects: >=2.0.0-beta
gotchaThe package is pre-release (beta); zero guarantees for stability.fixPin exact version in package.json.
affects: >=2.0.0-beta
Errors
Common errors & fixes
Error: Cannot find module '@gasbuddy/rest-api-support'
Missing npm install or incorrect package name (scoped package requires proper registry).
fixRun 'npm install @gasbuddy/rest-api-support' and ensure npm registry access.
TypeError: URLBuilder is not a constructor
Importing incorrectly (e.g., using default import when named import required).
fixUse named import: import { URLBuilder } from '@gasbuddy/rest-api-support' 'URLBuilder' cannot be used as a value because it was exported using 'export type'
Attempting to use a type that is not a runtime value.
fixEnsure you import runtime symbols; check if URLBuilder is a class or type.
Upgrade
Version history
2.0.0-beta.10latest on npm
Audit
Dependencies
No dependency data recorded yet.