{"library":"fs-constants","type":"library","category":null,"description":"The `fs-constants` package provides a unified and compatible way to access file system constants (like `O_RDONLY`, `S_IFMT`) across both Node.js and browser environments. It transparently handles the historical divergence and deprecation in Node.js, where `require('constants')` was replaced by `require('fs').constants`. For Node.js, it uses `require('fs').constants`, and for browser environments, it leverages `require('constants')`, which bundlers often polyfill or provide. Currently at version 1.0.0, it is a stable, low-maintenance utility designed to abstract away environment-specific constant imports, enabling more portable code for file system operations. Its primary differentiator is resolving this specific Node.js API evolution and ensuring browser compatibility for `fs` flags without complex conditional logic in application code.","language":"javascript","status":"active","version":"1.0.0","tags":["javascript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install fs-constants","imports":["const constants = require('fs-constants')"]},{"cmd":"yarn add fs-constants","imports":[]},{"cmd":"pnpm add fs-constants","imports":[]}],"homepage":null,"github":"https://github.com/mafintosh/fs-constants","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/fs-constants","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/fs-constants/compatibility"}}