2.0.7 • Published 4 years ago

@geeeger/is-http-url v2.0.7

Weekly downloads
6
License
ISC
Repository
github
Last release
4 years ago

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();
  });
});