Skip to content

afeiship/replace-host

Repository files navigation

replace-host

Replace host to the other.

version license size download

installation

npm install @jswork/replace-host

usage

import replaceHost from '@jswork/replace-host';

const url1 = 'https://aot-report-h5.dev.com/offline_asc_mobile?task_id=16807';
const url2 = 'https://sandbox-aot-report-h5.dev.com';

replaceHost(url1, url2);
// https://sandbox-aot-report-h5.dev.com/offline_asc_mobile?task_id=16807

license

Code released under the MIT license.