1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-09 21:30:05 +00:00

Merge branch 'master' of https://github.com/sasjs/adapter into sas-job-absolute-paths

This commit is contained in:
Krishna Acondy
2020-09-18 08:25:21 +01:00
46 changed files with 524 additions and 4147 deletions

View File

@@ -1,7 +1,7 @@
import { SASjsRequest } from '../types/SASjsRequest'
/**
* Comparator for SASjs request timestamps
* Comparator for SASjs request timestamps.
*
*/
export const compareTimestamps = (a: SASjsRequest, b: SASjsRequest) => {

View File

@@ -1,5 +1,5 @@
/**
* Checks if string is in URI format
* @param str string to check
* Checks if string is in URI format.
* @param str - string to check.
*/
export const isUri = (str: string): boolean => /^\/folders\/folders\//.test(str)

View File

@@ -1,3 +1,7 @@
/**
* Checks if string is in URL format.
* @param url - string to check.
*/
export const isUrl = (url: string): boolean => {
const pattern = new RegExp(
'^(http://|https://)[a-z0-9]+([-.]{1}[a-z0-9]+)*.[a-z]{2,5}(:[0-9]{1,5})?(/.*)?$',