Registry / serialization / get-set-props

get-set-props

JSON →
library0.2.0jsnpmunverified

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.

npm install get-set-props
INSTALL
IMPORT
SIG · GET-SET-PROPS
G
get-set-props
serializationjavascriptv0.2.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

getSetProps
import getSetProps from 'get-set-props';
const getSetProps = require('get-set-props');
The package primarily offers its data via a default ESM import. Ensure your environment supports ESM for direct usage.
getSetProps.json
import data from 'get-set-props/get-set-props.json';
For environments or bundlers that support direct JSON file imports, you can access the raw data directly from the package's internal path.
Type information
/** @type {import('get-set-props')} */ const getSetProps = require('get-set-props');
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.

Demonstrates how to import the default object and log its content, which lists getter/setter properties for various JavaScript built-in types.

import getSetProps from 'get-set-props'; console.log(getSetProps); /* // Example partial output: { Array: [ 'length', ], ArrayBuffer: [ ], Boolean: [], DataView: [ 'buffer', 'byteLength', 'byteOffset' ], Date: [ 'timezoneOffset' ], Error: [ 'stack' ], Float32Array: [ 'buffer', 'byteLength', 'byteOffset', 'length' ] } */
Debug
Known issues
gotchaThis 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.
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.
affects: >=0.1.0
breakingAs 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.
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.
affects: 0.x.x
gotchaThe 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.
fix
Ensure your Node.js environment meets the minimum requirement of version 18.0.0 or higher. Update your Node.js installation if necessary.
affects: <18.0.0 Node.js
Errors
Common errors & fixes
TypeError: getSetProps is not a function
Attempting to invoke the imported `getSetProps` as a function. The package exports a data object, not a callable function.
fix
Access properties directly from the imported object, e.g., `getSetProps.Array` to get the list for Arrays.
SyntaxError: Cannot use import statement outside a module
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).
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.
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
get-set-props — npm install get-set-props · libregistry