Comparing version 7.0.3 to 7.0.4-next.1703636478.634ff6c7f81e1575d1df90aebc1d841c137a0e00
// external | ||
import { a, ma } from '@bevry/render'; | ||
/** Verify an email */ | ||
function verifyEmail(email) { | ||
export function verifyEmail(email) { | ||
if (!email) | ||
@@ -10,8 +10,13 @@ return false; | ||
/** Verify a URL */ | ||
async function fetchOk(url) { | ||
const resp = await fetch(url, { method: 'HEAD' }); | ||
return resp.ok; | ||
export async function fetchOk(url) { | ||
try { | ||
const resp = await fetch(url, { method: 'HEAD' }); | ||
return resp.ok; | ||
} | ||
catch (error) { | ||
return false; | ||
} | ||
} | ||
/** Verify the failure of a URL */ | ||
async function fetchNotOk(url) { | ||
export async function fetchNotOk(url) { | ||
const ok = await fetchOk(url); | ||
@@ -18,0 +23,0 @@ return !ok; |
@@ -5,3 +5,3 @@ // external | ||
/** Verify an email */ | ||
function verifyEmail(email: string): boolean { | ||
export function verifyEmail(email: string): boolean { | ||
if (!email) return false | ||
@@ -12,9 +12,13 @@ return /.+?@.+/.test(email) | ||
/** Verify a URL */ | ||
async function fetchOk(url: string): Promise<boolean> { | ||
const resp = await fetch(url, { method: 'HEAD' }) | ||
return resp.ok | ||
export async function fetchOk(url: string): Promise<boolean> { | ||
try { | ||
const resp = await fetch(url, { method: 'HEAD' }) | ||
return resp.ok | ||
} catch (error) { | ||
return false | ||
} | ||
} | ||
/** Verify the failure of a URL */ | ||
async function fetchNotOk(url: string): Promise<boolean> { | ||
export async function fetchNotOk(url: string): Promise<boolean> { | ||
const ok = await fetchOk(url) | ||
@@ -21,0 +25,0 @@ return !ok |
// external | ||
import { a, ma } from '@bevry/render'; | ||
/** Verify an email */ | ||
function verifyEmail(email) { | ||
export function verifyEmail(email) { | ||
if (!email) | ||
@@ -10,8 +10,13 @@ return false; | ||
/** Verify a URL */ | ||
async function fetchOk(url) { | ||
const resp = await fetch(url, { method: 'HEAD' }); | ||
return resp.ok; | ||
export async function fetchOk(url) { | ||
try { | ||
const resp = await fetch(url, { method: 'HEAD' }); | ||
return resp.ok; | ||
} | ||
catch (error) { | ||
return false; | ||
} | ||
} | ||
/** Verify the failure of a URL */ | ||
async function fetchNotOk(url) { | ||
export async function fetchNotOk(url) { | ||
const ok = await fetchOk(url); | ||
@@ -18,0 +23,0 @@ return !ok; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.comparator = exports.Format = void 0; | ||
exports.comparator = exports.Format = exports.fetchNotOk = exports.fetchOk = exports.verifyEmail = void 0; | ||
// external | ||
@@ -12,7 +12,14 @@ const render_1 = require("@bevry/render"); | ||
} | ||
exports.verifyEmail = verifyEmail; | ||
/** Verify a URL */ | ||
async function fetchOk(url) { | ||
const resp = await fetch(url, { method: 'HEAD' }); | ||
return resp.ok; | ||
try { | ||
const resp = await fetch(url, { method: 'HEAD' }); | ||
return resp.ok; | ||
} | ||
catch (error) { | ||
return false; | ||
} | ||
} | ||
exports.fetchOk = fetchOk; | ||
/** Verify the failure of a URL */ | ||
@@ -23,2 +30,3 @@ async function fetchNotOk(url) { | ||
} | ||
exports.fetchNotOk = fetchNotOk; | ||
/** A rendering style for {@link Fellow} */ | ||
@@ -25,0 +33,0 @@ var Format; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.comparator = exports.Format = void 0; | ||
exports.comparator = exports.Format = exports.fetchNotOk = exports.fetchOk = exports.verifyEmail = void 0; | ||
// external | ||
@@ -12,7 +12,14 @@ const render_1 = require("@bevry/render"); | ||
} | ||
exports.verifyEmail = verifyEmail; | ||
/** Verify a URL */ | ||
async function fetchOk(url) { | ||
const resp = await fetch(url, { method: 'HEAD' }); | ||
return resp.ok; | ||
try { | ||
const resp = await fetch(url, { method: 'HEAD' }); | ||
return resp.ok; | ||
} | ||
catch (error) { | ||
return false; | ||
} | ||
} | ||
exports.fetchOk = fetchOk; | ||
/** Verify the failure of a URL */ | ||
@@ -23,2 +30,3 @@ async function fetchNotOk(url) { | ||
} | ||
exports.fetchNotOk = fetchNotOk; | ||
/** A rendering style for {@link Fellow} */ | ||
@@ -25,0 +33,0 @@ var Format; |
@@ -0,1 +1,7 @@ | ||
/** Verify an email */ | ||
export declare function verifyEmail(email: string): boolean; | ||
/** Verify a URL */ | ||
export declare function fetchOk(url: string): Promise<boolean>; | ||
/** Verify the failure of a URL */ | ||
export declare function fetchNotOk(url: string): Promise<boolean>; | ||
/** A rendering style for {@link Fellow} */ | ||
@@ -2,0 +8,0 @@ export declare enum Format { |
{ | ||
"name": "fellow", | ||
"version": "7.0.3", | ||
"version": "7.0.4-next.1703636478.634ff6c7f81e1575d1df90aebc1d841c137a0e00", | ||
"license": "Artistic-2.0", | ||
@@ -5,0 +5,0 @@ "description": "Fellow is a package for creating people that can be unified by their shared values via a singleton list on the class", |
@@ -54,3 +54,3 @@ <!-- TITLE/ --> | ||
``` typescript | ||
import pkg from 'https://unpkg.com/fellow@^7.0.3/edition-deno/index.ts' | ||
import pkg from 'https://unpkg.com/fellow@^7.0.4/edition-deno/index.ts' | ||
``` | ||
@@ -62,3 +62,3 @@ | ||
<script type="module"> | ||
import pkg from '//cdn.skypack.dev/fellow@^7.0.3' | ||
import pkg from '//cdn.skypack.dev/fellow@^7.0.4' | ||
</script> | ||
@@ -71,3 +71,3 @@ ``` | ||
<script type="module"> | ||
import pkg from '//unpkg.com/fellow@^7.0.3' | ||
import pkg from '//unpkg.com/fellow@^7.0.4' | ||
</script> | ||
@@ -80,3 +80,3 @@ ``` | ||
<script type="module"> | ||
import pkg from '//dev.jspm.io/fellow@7.0.3' | ||
import pkg from '//dev.jspm.io/fellow@7.0.4' | ||
</script> | ||
@@ -83,0 +83,0 @@ ``` |
@@ -5,3 +5,3 @@ // external | ||
/** Verify an email */ | ||
function verifyEmail(email: string): boolean { | ||
export function verifyEmail(email: string): boolean { | ||
if (!email) return false | ||
@@ -12,9 +12,13 @@ return /.+?@.+/.test(email) | ||
/** Verify a URL */ | ||
async function fetchOk(url: string): Promise<boolean> { | ||
const resp = await fetch(url, { method: 'HEAD' }) | ||
return resp.ok | ||
export async function fetchOk(url: string): Promise<boolean> { | ||
try { | ||
const resp = await fetch(url, { method: 'HEAD' }) | ||
return resp.ok | ||
} catch (error) { | ||
return false | ||
} | ||
} | ||
/** Verify the failure of a URL */ | ||
async function fetchNotOk(url: string): Promise<boolean> { | ||
export async function fetchNotOk(url: string): Promise<boolean> { | ||
const ok = await fetchOk(url) | ||
@@ -21,0 +25,0 @@ return !ok |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
255483
6151
1