@geeeger/is-http-url
TypeScript icon, indicating that this package has built-in type declarations

2.0.7 • Public • Published

is-http-url

判断链接是否为http链接

Usage

import is from '@geeeger/is-http-url';
describe('@geeeger/is-http-url module', () => {
  it('should pass', () => {
    expect(is('http://www.baidu.com')).toBeTruthy();
    expect(is('https://www.baidu.com')).toBeTruthy();
    expect(is('//www.baidu.com')).toBeTruthy();
    expect(is('test://https://')).toBeFalsy();
  });
});

Readme

Keywords

Package Sidebar

Install

npm i @geeeger/is-http-url

Weekly Downloads

0

Version

2.0.7

License

ISC

Unpacked Size

1.48 kB

Total Files

4

Last publish

Collaborators

  • geeeger