@automattic/vip-search-replace
v1.1.3
Published
A Node package interface to a Go powered search and replace package
Downloads
5,998
Maintainers
Keywords
Readme
VIP Search & Replace
How to use this package?
const { replace } = require( '@automattic/vip-search-replace' );
// Create a readable and writeable stream. Can be any stream: File, std, etc...
const readableStream = fs.createReadStream( 'path_to_sql_file.sql' );
const writeableStream = fs.createWriteStream( 'path_to_sql_file_replaced.sql', { encoding: 'utf8' } );
const result = await replace( readableStream, [ 'thisdomain.com', 'thatdomain.com' ] );
result.pipe( writeableStream );
Contributing
For details about contributing to this project (e.g. setting up development environment, publishing a release, etc.), please see CONTRIBUTING.md.