Socket
Socket
Sign inDemoInstall

memory-pager

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

memory-pager - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

12

index.js

@@ -49,4 +49,4 @@ module.exports = Pager

if (page) page.buffer = buf
else page = this.pages[i] = new Page(i, buf)
if (page) page.buffer = truncate(buf, this.pageSize)
else page = this.pages[i] = new Page(i, truncate(buf, this.pageSize))
}

@@ -74,2 +74,10 @@

function truncate (buf, len) {
if (buf.length === len) return len
if (buf.length > len) return buf.slice(0, len)
var cpy = alloc(len)
buf.copy(cpy)
return cpy
}
function alloc (size) {

@@ -76,0 +84,0 @@ if (Buffer.alloc) return Buffer.alloc(size)

2

package.json
{
"name": "memory-pager",
"version": "1.0.0",
"version": "1.0.1",
"description": "Access memory using small fixed sized buffers",

@@ -5,0 +5,0 @@ "main": "index.js",

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