
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
All of the implementations of stacks I found attached everything to the
prototype and didn't make good use of private encapsulation, getters,
non-enumerable methods, etc.
So here it is, a clean implementation of a stack written in straight simple es5.
var createStack = require('dastack');
var stack = createStack(); // => Creates an empty stack
var stack = createStack(1, 2, 3); // => Creates a stack with initial values
The only property on the stack is size, works exactly the same as the length
property on Array.
var stack = createStack(1, 2, 3);
stack.size // => 3
Add a new element to the top of the stack.
var stack2 = createStack(1, 2, 3);
stack.size // => 3
Remove the top element from the top of the stack.
var stack = createStack(1, 2, 3);
stack.pop() // => 3
stack.size // => 2
Get the top element from the top of the stack, but do not remove it.
var stack = createStack(1, 2, 3);
stack.peek() // => 3
stack.size // => 3
Empty the stack.
var stack = createStack(1, 2, 3);
stack.clear()
stack.size // => 0
Get the current stack as a string.
var stack = createStack(1, 2, 3);
stack.toString() // => "1,2,3"
Copy the current stack into a regular array.
var stack = createStack(1, 2, 3);
stack.toArray() // => [1, 2, 3]
FAQs
A stack written in clean es5
The npm package dastack receives a total of 2 weekly downloads. As such, dastack popularity was classified as not popular.
We found that dastack 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.