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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.7
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.7
    2
  • 2.0.5
    1
  • 2.0.0
    1

Package Sidebar

Install

npm i @geeeger/is-http-url

Weekly Downloads

4

Version

2.0.7

License

ISC

Unpacked Size

1.48 kB

Total Files

4

Last publish

Collaborators

  • geeeger