{"repo":"adamreisnz/replace-in-file","free":true,"listed":false,"github":"https://github.com/adamreisnz/replace-in-file","clone":"git clone https://github.com/adamreisnz/replace-in-file.git","description":"A simple utility to quickly replace contents in one or more files","language":"TypeScript","stars":616,"topics":["file","replace","glob","promise","cli","callback","asynchronously","text"],"license":"MIT","category":"cli-tools","readme_excerpt":"Replace in file A simple utility to quickly replace text in one or more files or globs. Works synchronously or asynchronously with either promises or callbacks. Make a single replacement or multiple replacements at once. Index - Installation - Basic usage - Asynchronous replacement - Synchronous replacement - Return value - Counting matches and replacements - Advanced usage - Replace a single file or glob - Replace multiple files or globs - Replace first occurrence only - Replace all occurrences - Multiple values with the same replacement - Custom regular expressions - Multiple values with different replacements - Multiple replacements with different options - Using callbacks for from - Using callbacks for to - Saving to a different file - Ignore a single file or glob - Ignore multiple files or globs - Allow empty/invalid paths - Disable globs - Specify glob configuration - Making replacements on network drives - Specify character encoding - Dry run - Replacing in large files (streaming) - Using custom processors - Using a custom file system API - CLI usage - A note on using globs with the CLI - Version information - License Installation Basic usage Asynchronous replacement Synchronous replacement Return value The return value of the library is an array of replacement results against each file that was processed. This includes files in which no replacements were made. Each result contains the following values: - file : The path to the file that was processed - hasChanged : Fl","default_branch":null,"files":null,"tree":[],"storefront":"/r/adamreisnz","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/adamreisnz/replace-in-file/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}