{"library":"capability","type":"library","category":null,"description":"capability.js is a lightweight JavaScript library designed for detecting specific environmental capabilities, primarily focusing on browser features. Released in 2016, its current stable version is 0.2.5, indicating it has not seen significant development since its initial release. The library allows developers to define custom capability tests using a simple API and then query or enforce these capabilities. Unlike comprehensive feature detection libraries like Modernizr, `capability.js` provides a minimalist approach for defining and checking individual features such as `Object.create`, `Array.prototype.forEach`, or `Function.prototype.bind`. Its release cadence appears to be inactive, with no recent updates. It relies on CommonJS modules and requires a bundler like Webpack or Browserify for use in browser environments, as native ES modules were not widely supported when it was developed. This makes it less suitable for modern projects that typically use native ES modules and rely on built-in browser feature detection or more actively maintained polyfill solutions.","language":"javascript","status":"abandoned","version":"0.2.5","tags":["javascript","environment","browser","capability","test","detect"],"last_verified":"Wed May 27","install":[{"cmd":"npm install capability","imports":["const capability = require('capability');","const capability = require('capability');\ncapability.define('myFeature', () => /* test logic */);","const capability = require('capability');\nconst isSupported = capability.test('Object.create');","require('capability/es5');"]},{"cmd":"yarn add capability","imports":[]},{"cmd":"pnpm add capability","imports":[]}],"homepage":null,"github":"https://github.com/inf3rno/capability","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/capability","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/capability/compatibility"}}