Travis build: 732 [ci skip]
This commit is contained in:
@ -5,7 +5,7 @@ Returns `true` if the given string is an absolute URL, `false` otherwise.
|
||||
Use a regular expression to test if the string is an absolute URL.
|
||||
|
||||
```js
|
||||
const isAbsoluteURL = str => /^[a-z][a-z0-9+.-]*:/.test(str);
|
||||
const isAbsoluteURL = str => /^[a-z][a-z0-9+.-]*:/.test(str);
|
||||
```
|
||||
|
||||
```js
|
||||
|
||||
@ -9,7 +9,7 @@ const isValidJSON = obj => {
|
||||
try {
|
||||
JSON.parse(obj);
|
||||
return !!obj;
|
||||
} catch (e) {
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user