{"library":"safe-buffer","type":"library","category":null,"description":"safe-buffer is a JavaScript library that provides a consistent and safer API for Node.js `Buffer` operations, particularly for older Node.js environments. It backports the modern `Buffer.from`, `Buffer.alloc`, and `Buffer.allocUnsafe` methods, which address security and stability concerns related to uninitialized memory in older `new Buffer(size)` constructors. For Node.js versions where these safer methods are natively available (v6.0.0 and above), `safe-buffer` transparently defers to the built-in implementation, acting as a compatibility layer. The current stable version is 5.2.1, with releases being infrequent given its role as a polyfill for established Node.js core APIs, with the last major update occurring approximately 6 years ago. Its primary differentiator is ensuring safe `Buffer` allocation across a wide range of Node.js versions without requiring conditional logic in application code.","language":"javascript","status":"maintenance","version":"5.2.1","tags":["javascript","buffer","buffer allocate","node security","safe","safe-buffer","security","uninitialized","typescript"],"install":[{"cmd":"npm install safe-buffer","imports":["import { Buffer } from 'safe-buffer';","const Buffer = require('safe-buffer').Buffer;","import { Buffer } from 'safe-buffer';"]},{"cmd":"yarn add safe-buffer","imports":[]},{"cmd":"pnpm add safe-buffer","imports":[]}],"homepage":null,"github":"https://github.com/feross/safe-buffer","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/safe-buffer","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/safe-buffer/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Mon Jul 20","install_tag":null}}