@automattic/vip-search-replace
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

nlm-github nlm-version

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.

/@automattic/vip-search-replace/

    Package Sidebar

    Install

    npm i @automattic/vip-search-replace

    Weekly Downloads

    1,462

    Version

    1.1.3

    License

    MIT

    Unpacked Size

    13.7 kB

    Total Files

    6

    Last publish

    Collaborators

    • wpvip-bot
    • brunobasto
    • andrea-sdl
    • t2dw4t
    • wwa
    • mjangda
    • a8c
    • hanifn
    • saroshaga
    • parkcityj
    • nejclovrencic
    • chriszarate
    • robersongomes
    • mehmoodak
    • aagam94
    • alec-geatches
    • jblz
    • bsessions85
    • luiztiago
    • gandalfcoder