
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@dogmalang/stack
Advanced tools
A stack implementation.
Developed in Dogma, compiled to JavaScript.
Engineered in Valencia, Spain, EU by Justo Labs.
The package must be imported as follows:
////////////////
// JavaScript //
////////////////
const Stack = require("@dogmalang/stack");
#########
# Dogma #
#########
use "@dogmalang/stack" as Stack
////////////////
// JavaScript //
////////////////
constructor()
constructor(items:any[])
constructor(opts:{max:number})
#########
# Dogma #
#########
type Stack()
type Stack(items:list)
type Stack(opts:{max:num})
items, the initial items.opts, the options: max, maximum number of items.Examples:
////////////////
// JavaScript //
////////////////
s = new Stack()
s = new Stack(["one", "two", "three"])
s = new Stack({max: 123})
#########
# Dogma #
#########
s = Stack()
s = Stack(["one", "two", "three"])
s = Stack({max=123})
Add a new item to the stack:
////////////////
// JavaScript //
////////////////
push(item) : Stack
#########
# Dogma #
#########
fn Stack.push(item) -> self
The method returns the stack for chaining other pushes.
If the stack has max and this reached, an error is raised.
Example:
s.push("one").push("two").push("three")
Remove the top item and returning it:
////////////////
// JavaScript //
////////////////
pop() : any
#########
# Dogma #
#########
fn Stack.pop() : any
If the stack is empty, an error is raised.
Example:
i = s.pop()
Return the current length:
////////////////
// JavaScript //
////////////////
len() : number
#########
# Dogma #
#########
fn Stack.len() : num
Example:
size = s.len()
Check whether the stack is empty:
////////////////
// JavaScript //
////////////////
isEmpty() : boolean
#########
# Dogma #
#########
fn Stack.isEmpty() : bool
Example:
s.isEmpty()
Return the top item without removing it:
////////////////
// JavaScript //
////////////////
top() : any
#########
# Dogma #
#########
fn Stack.top() : any
Example:
s.push("one").push("two").top()
Return a list with the items:
////////////////
// JavaScript //
////////////////
list() : any[]
#########
# Dogma #
#########
fn Stack.list() : list
Example:
s.list()
FAQs
A stack implementation.
We found that @dogmalang/stack demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.