{"id":42085,"library":"test-match","title":"test-match","description":"A small utility for testing string matches against include and exclude patterns, using the current working directory for path resolution. Version 1.2.1 is current. No regular releases. Key differentiator: minimal API for matching against file/directory patterns with cwd support. Ships TypeScript types.","status":"active","version":"1.2.1","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/kmalakoff/test-match","tags":["javascript","test","match","include","exclude","directory","file","typescript"],"install":[{"cmd":"npm install test-match","lang":"bash","label":"npm"},{"cmd":"yarn add test-match","lang":"bash","label":"yarn"},{"cmd":"pnpm add test-match","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export only; named import will fail.","wrong":"import { match } from 'test-match'","symbol":"match","correct":"import match from 'test-match'"},{"note":"CommonJS require returns the default export directly.","wrong":"const { match } = require('test-match')","symbol":"match","correct":"const match = require('test-match')"},{"note":"No .default needed in CommonJS; it's the direct result.","wrong":"const match = require('test-match').default","symbol":"match","correct":"import match from 'test-match'"}],"quickstart":{"code":"import match from 'test-match';\n\nconst test = match({\n  include: 'react-*',\n  exclude: 'react-native-*'\n});\n\nconsole.log(test('react-dom')); // true\nconsole.log(test('react-native-aria')); // false","lang":"typescript","description":"Show basic usage: create a matcher with include/exclude patterns and test strings."},"warnings":[{"fix":"N/A","message":"This package has no known breaking changes in version 1.x.","severity":"breaking","affected_versions":"1.0.0 - 1.2.1"},{"fix":"Use `const match = require('test-match')`","message":"CommonJS require returns the default export directly, not an object with `default` property.","severity":"gotcha","affected_versions":"*"},{"fix":"Refer to minimatch documentation for valid glob patterns.","message":"Patterns use minimatch syntax, not regex.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'1.2.1':25 'api':34 'current':18,27 'cwd':41 'differenti':32 'directori':20,51 'exclud':14,50 'file':52 'file/directory':38 'includ':12,49 'javascript':46 'key':31 'match':3,10,36,48 'minim':33 'path':22 'pattern':15,39 'regular':29 'releas':30 'resolut':23 'ship':43 'small':5 'string':9 'support':42 'test':2,8,47 'test-match':1 'type':45 'typescript':44,53 'use':16 'util':6 'version':24 'work':19","created_at":"2026-06-04T18:55:32.797852+00:00","updated_at":"2026-06-04T18:55:32.797852+00:00","problems":[{"fix":"Change `import { match } from 'test-match'` to `import match from 'test-match'`","cause":"Using named import instead of default import.","error":"TypeError: test.match is not a function"},{"fix":"Run `npm install test-match@1.2.1`","cause":"Package not installed or wrong version.","error":"Error: Cannot find module 'test-match'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/kmalakoff/test-match","github":"ssh://git@github.com/kmalakoff/test-match","docs":null,"changelog":null,"pypi":null,"npm":"test-match","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}