urbit-ob

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

commit eccb657f513ecbf9384416a4c6eac790fc350a1b
parent 832edb62b25ca5d1a92b1d197aa1bc2eb33da49b
Author: Jared Tobin <jared@jtobin.io>
Date:   Fri, 16 Nov 2018 16:52:46 +1300

Minor version bump (3.0.1 -> 3.1.0).

* Update README.
* Update CHANGELOG.

Diffstat:
MCHANGELOG | 4++++
MREADME.md | 9++++++---
Mpackage.json | 2+-
3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG @@ -1,5 +1,9 @@ # Changelog +- 3.1.0 (2018-11-16) + * Exports 'isValidPatp' and 'isValidPatq' functions for checking the + validity of @p and @q strings. + - 3.0.0 (2018-11-02) * Major library cleanup and API simplification. Eliminates old, dead, or redundant code that had accrued over time. Exposes patp, patp2dec, diff --git a/README.md b/README.md @@ -31,13 +31,14 @@ down the dependencies. The library exposes two families of functions: -* `patp / patp2dec / patp2hex / hex2patp` -* `patq / patq2dec / patq2hex / hex2patq` +* `patp / patp2dec / patp2hex / hex2patp / isValidPatp` +* `patq / patq2dec / patq2hex / hex2patq / isValidPatq` They are pretty self-explanatory. Use `patp` or `patq` to convert base-10 numbers (or strings encoding base-10 numbers) to `@p` or `@q` respectively. Use `patp2dec` or `patq2dec` to go in reverse. `patp2hex`, `patq2hex`, and -their inverses work similarly. +their inverses work similarly. `isValidPat{p, q}` can be used to check the +validity of a `@p` or `@q` string. Some examples: @@ -51,6 +52,8 @@ Some examples: '~doznec-binwes' > ob.patq2hex('~marned-wismul-nilsev-botnyt') '01ca0e51d20462f3' +> ob.isValidPatq('~marned-wismul-nilsev-botnyt') +> true ``` There are a few other noteworthy functions exposed as well: diff --git a/package.json b/package.json @@ -1,6 +1,6 @@ { "name": "urbit-ob", - "version": "3.0.1", + "version": "3.1.0", "description": "Utilities for Hoon-style atom printing and conversion", "main": "src/index.js", "scripts": {