jsonld-signatures-merkleproof2019
Version:
A jsonld signature implementation to support MerkleProof2019 verification in Verifiable Credential context
17 lines (16 loc) • 561 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.startsWith = startsWith;
exports.capitalize = capitalize;
function startsWith(stringContent, pattern) {
if (typeof stringContent !== 'string') {
console.warn('Trying to test a non string variable');
return false;
}
return stringContent.indexOf(pattern) === 0;
}
function capitalize(value) {
const firstLetter = value.substr(0, 1);
const rest = value.substr(1, value.length - 1);
return firstLetter.toUpperCase() + rest.toLowerCase();
}