next-url-status
Detect url status code for next.
installation
npm install -S @jswork/next-url-status
usage
import '@jswork/next-url-status';
const url = 'https://www.baidu.com/index.html';
nx.urlStatus(url).then((res) => {
console.log(res);
});
// failed : { code: -1 }
// success: { code: 200 }
license
Code released under the MIT license.