Registry / testing / quesk
library2.0.1jsnpmunverified

Quesk is a lightweight JavaScript library (v2.0.1, last updated 2017) providing abstract data types for both Queue and Stack collections. It supports both CommonJS and ES module imports, and includes a UMD bundle for browser use. The API is minimal, offering methods like append, prepend, shift, pop, first, last, and length. It differentiates from libraries like `denque` or `double-ended-queue` by focusing solely on basic first-in-first-out and last-in-first-out operations without additional features, making it suitable for small projects or educational use. However, it has no active maintenance and may lack modern JavaScript optimizations.

npm install quesk
INSTALL
IMPORT
SIG · QUESK
Q
quesk
testingjavascriptv2.0.1
harness data pending
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.

queuesk (default export)
import quesk from 'quesk'
const quesk = require('quesk')
ESM usage requires Node >= 4 or a bundler. Default export is a function.
Queuesk as CommonJS require
const quesk = require('quesk').default || require('quesk')
const quesk = require('quesk'); quesk()
CJS users may need .default if the module uses ESM interop. Check your Node version.
Browser global
<script src="https://unpkg.com/quesk/dist/quesk.min.js"></script>
window.quesk()
UMD exposes the library as window.quesk (function).

Shows how to create Queue and Stack instances, add items, access first/last, and remove items.

import quesk from 'quesk'; // Queue example const queue = quesk(); queue.append('a'); queue.append('b'); console.log(queue.first()); // 'a' queue.shift(); console.log(queue.length()); // 1 // Stack example const stack = quesk(); stack.prepend('x'); stack.prepend('y'); console.log(stack.last()); // 'y' stack.pop(); console.log(stack.length()); // 1
Debug
Known issues
breakingBreaking change: In v2, the default import is a function that returns an object, not the object itself.
fix
Always call quesk() to get an instance.
affects: >=2.0.0
gotchaThe library mutates the internal array; there is no immutability support.
fix
Create a new instance if you need to preserve state.
affects: *
deprecatedNo new releases since 2017; project is abandoned.
fix
Consider using actively maintained alternatives like denque or double-ended-queue.
affects: *
gotchaMethod names (append, prepend, shift, pop) mimic array methods but do not behave exactly like Array.prototype methods (e.g., shift returns undefined, not the removed element).
fix
Use first()/last() to access elements before removing; pop()/shift() only remove and return the element.
affects: *
Errors
Common errors & fixes
TypeError: quesk is not a function
Using default import incorrectly; missing parentheses or using wrong import style.
fix
Ensure you call quesk() after import: const q = quesk();
Cannot find module 'quesk'
Package not installed or not found in node_modules.
fix
Run 'npm install quesk' or 'yarn add quesk'
Object(...) is not a function
Transpilation issues with Karma or Jest; missing babel transform for es modules.
fix
Add 'transform-es2015-modules-commonjs' to your Babel configuration.
Upgrade
Version history
2.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
packagequesk
quesk — npm install quesk · libregistry