UNPKG

@valkyriestudios/validator

Version:

A lightweight configurable javascript validator

10 lines (9 loc) 316 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.vBase64 = vBase64; exports.default = vBase64; const RGX = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/; function vBase64(val) { return typeof val === 'string' && val.length > 0 && RGX.test(val); }