A Node.js library for extracting text snippets from files or strings using customizable delimiters. Version 0.6.5 is the latest stable release. The library returns snippets as strings or can break them into key/value pairs with optional JSON output. It uses a Promise-based API and supports glob patterns for file matching. Unlike simple grep or regex solutions, file-pluck provides built-in objectification and JSON serialization, making it suitable for documentation generation and structured data extraction from annotated code or markup.
npm install file-pluckNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: creating an instance with default options, plucking snippets from a file, and logging results.
Use const p = filePluck(); then call p.pluckFile() or p.objectify()
Update code to call filePluck() before using methods.
Use require() or set up bundler to handle CJS.
Test glob patterns carefully; use simple file paths when possible.
const p = filePluck(); then p.pluckFile('file.txt')Use dynamic import or configure your project for CommonJS.
Run: npm install file-pluck
No dependency data recorded yet.