{"id":10941,"library":"get-set-props","title":"JavaScript Getter/Setter Properties List","description":"The `get-set-props` package provides a comprehensive, machine-readable list of getter and setter properties available on standard JavaScript built-in types. This data is exposed as a simple JSON file, making it highly portable and usable across various JavaScript environments, including Node.js and browsers. Currently at version 0.2.0, its release cadence is likely infrequent, primarily tied to updates in the JavaScript specification or the underlying data source it forks from (Sindre Sorhus' `proto-props`). Its primary differentiator is its simplicity and directness: it's a static data set rather than a runtime utility, making it ideal for tooling, static analysis, or documentation generation that needs to query the reflective properties of JavaScript objects.","status":"active","version":"0.2.0","language":"javascript","source_language":"en","source_url":"https://github.com/dustinspecker/get-set-props","tags":["javascript","js","ecmascript","builtin","types","type","data","getter"],"install":[{"cmd":"npm install get-set-props","lang":"bash","label":"npm"},{"cmd":"yarn add get-set-props","lang":"bash","label":"yarn"},{"cmd":"pnpm add get-set-props","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The package primarily offers its data via a default ESM import. Ensure your environment supports ESM for direct usage.","wrong":"const getSetProps = require('get-set-props');","symbol":"getSetProps","correct":"import getSetProps from 'get-set-props';"},{"note":"For environments or bundlers that support direct JSON file imports, you can access the raw data directly from the package's internal path.","symbol":"getSetProps.json","correct":"import data from 'get-set-props/get-set-props.json';"},{"note":"While primarily ESM, if using CommonJS (e.g., in an older Node.js project), you can use `require` and leverage JSDoc for type inference from the package's type definitions if available, though direct ESM import is preferred.","symbol":"Type information","correct":"/** @type {import('get-set-props')} */\nconst getSetProps = require('get-set-props');"}],"quickstart":{"code":"import getSetProps from 'get-set-props';\n\nconsole.log(getSetProps);\n/*\n// Example partial output:\n{\n\tArray: [\n\t\t'length',\n\t],\n\tArrayBuffer: [\n\t],\n\tBoolean: [],\n\tDataView: [\n\t\t'buffer',\n\t\t'byteLength',\n\t\t'byteOffset'\n\t],\n\tDate: [\n\t\t'timezoneOffset'\n\t],\n\tError: [\n\t\t'stack'\n\t],\n\tFloat32Array: [\n\t\t'buffer',\n\t\t'byteLength',\n\t\t'byteOffset',\n\t\t'length'\n\t]\n}\n*/","lang":"javascript","description":"Demonstrates how to import the default object and log its content, which lists getter/setter properties for various JavaScript built-in types."},"warnings":[{"fix":"Understand that the package provides pre-compiled data; integrate its JSON output into your tooling or application logic for static analysis, rather than attempting to call methods on it.","message":"This package is a static data source (a JSON file) and does not provide any runtime functions or utilities for dynamically reflecting properties. Users expecting a utility library to inspect objects at runtime should look for alternatives.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"For production environments, consider pinning to exact package versions (e.g., `'get-set-props': '0.2.0'`) or implement robust schema validation if your application critically depends on the precise data structure.","message":"As a pre-1.0 package (currently 0.2.0), the exact structure or content of the exported JSON data might change in minor or even patch versions without strictly adhering to semantic versioning guidelines for data structure updates. Always review changes when upgrading.","severity":"breaking","affected_versions":"0.x.x"},{"fix":"Ensure your Node.js environment meets the minimum requirement of version 18.0.0 or higher. Update your Node.js installation if necessary.","message":"The package requires Node.js version 18 or greater, as specified in its `engines` field. Using it with older Node.js versions may lead to unexpected behavior or errors related to module resolution or syntax.","severity":"gotcha","affected_versions":"<18.0.0 Node.js"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Access properties directly from the imported object, e.g., `getSetProps.Array` to get the list for Arrays.","cause":"Attempting to invoke the imported `getSetProps` as a function. The package exports a data object, not a callable function.","error":"TypeError: getSetProps is not a function"},{"fix":"To use ESM `import` statements, ensure your Node.js project's `package.json` includes `\"type\": \"module\"` or use a bundler (like Webpack, Rollup, Parcel) to transpile your code for CommonJS compatibility if targeting older environments.","cause":"Using `import` syntax in a CommonJS-only environment (e.g., an older Node.js project without `\"type\": \"module\"` in `package.json` or without proper transpilation).","error":"SyntaxError: Cannot use import statement outside a module"}],"ecosystem":"npm"}