urbit-ob

JavaScript utilities for phonemic base wrangling.
Log | Files | Refs | README

commit 79841236154daec9f975d595741cc383eca16878
parent c91e9175c1ee346af2eb8b90abc90202c96b9aac
Author: Jared Tobin <jared@jtobin.io>
Date:   Fri, 16 Nov 2018 16:34:41 +1300

Export isValidPatq, isValidPatp.

Diffstat:
Msrc/internal/co.js | 14++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/internal/co.js b/src/internal/co.js @@ -353,11 +353,11 @@ const sein = (name) => { /** * Weakly check if a string is a valid @p or @q value. * - * This is, at present, a pretty weak internal sanity check. It doesn't - * confirm the structure precisely (e.g. dashes), and for @q, it's required - * that q values of (greater than one) odd bytelength have been zero-padded. - * So, for example, '~doznec-binwod' will be considered a valid @q, but - * '~nec-binwod' will not. + * This is, at present, a pretty weak sanity check. It doesn't confirm the + * structure precisely (e.g. dashes), and for @q, it's required that q values + * of (greater than one) odd bytelength have been zero-padded. So, for + * example, '~doznec-binwod' will be considered a valid @q, but '~nec-binwod' + * will not. * * @param {String} name a @p or @q value * @return {String} @@ -419,5 +419,7 @@ module.exports = { patq2dec, clan, sein, - eqPatq + eqPatq, + isValidPatq: isValidPat, // reserving for diff impls in future + isValidPatp: isValidPat }