New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bnaya/objectbuffer

Package Overview
Dependencies
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bnaya/objectbuffer - npm Package Compare versions

Comparing version 0.0.0-4b90e23 to 0.0.0-7eda641

2

package.json
{
"name": "@bnaya/objectbuffer",
"description": "Object-like api, backed by an array buffer",
"version": "0.0.0-4b90e23",
"version": "0.0.0-7eda641",
"main": "dist/objectbuffer.cjs.js",

@@ -6,0 +6,0 @@ "module": "dist/index.js",

@@ -204,2 +204,61 @@ /* eslint-env jest */

test.skip("linkedList linkedListLowLevelIterator - delete while iteration - delete current value", () => {
setABSize(256);
const linkedListPointer = initLinkedList({ dataView, allocator });
expect(allocator.stats().available).toMatchInlineSnapshot(`184`);
const regularSet = new Set([7, 6, 5, 4]);
const itemsPointers = [
linkedListItemInsert({ dataView, allocator }, linkedListPointer, 7),
linkedListItemInsert({ dataView, allocator }, linkedListPointer, 6),
linkedListItemInsert({ dataView, allocator }, linkedListPointer, 5),
linkedListItemInsert({ dataView, allocator }, linkedListPointer, 4)
];
const linkedLintResults = [];
let iteratorPointer = 0;
while (
(iteratorPointer = linkedListLowLevelIterator(
dataView,
linkedListPointer,
iteratorPointer
))
) {
linkedLintResults.push(linkedListGetValue(dataView, iteratorPointer));
linkedListItemRemove({ dataView, allocator }, iteratorPointer);
}
const regularSetResults: number[] = [];
for (const v of regularSet) {
regularSetResults.push(v);
regularSet.delete(v);
}
expect(regularSetResults).toMatchInlineSnapshot(`
Array [
7,
6,
5,
4,
]
`);
expect(linkedLintResults).toMatchInlineSnapshot(`
Array [
7,
5,
]
`);
expect(regularSetResults).toEqual(linkedLintResults);
expect(allocator.stats().available).toMatchInlineSnapshot(`152`);
itemsPointers.forEach(p =>
linkedListItemRemove({ dataView, allocator }, p)
);
expect(allocator.stats().available).toMatchInlineSnapshot(`184`);
});
test("linkedList linkedListLowLevelIterator - add while iteration", () => {

@@ -206,0 +265,0 @@ setABSize(256);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc