How to use is-url-superb - 3 common examples

To help you get started, we’ve selected a few is-url-superb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github oceanprotocol / commons / client / src / routes / Publish / Files / ItemForm.tsx View on Github external
private handleSubmit = (e: Event) => {
        e.preventDefault()

        const { url } = this.state

        // return when required fields are empty, and url value is no url
        // Can't use browser validation cause we are in a form within a form
        if (!url) {
            this.setState({ hasError: true })
            return
        }

        if (url && !url.includes('ipfs://') && !isUrl(url)) {
            this.setState({ noUrl: true })
            return
        }

        this.props.addFile(url)
    }
github ArkEcosystem / typescript-client / src / connection.ts View on Github external
public constructor(private readonly host: string) {
		if (!isUrl(host)) {
			throw new Error(`${host} is not a valid URL.`);
		}
	}
github poketo / poketo-reader / api / src / utils.js View on Github external
isUrl: (input: string) => {
    return isUrl(input);
  },

is-url-superb

Check if a string is a URL

MIT
Latest version published 3 years ago

Package Health Score

74 / 100
Full package analysis

Popular is-url-superb functions