Skip to content

Instantly share code, notes, and snippets.

View 0xjeremyfrank's full-sized avatar

Jeremy Frank 0xjeremyfrank

  • Chainlink Labs
  • Denver, CO
  • 22:25 (UTC -07:00)
View GitHub Profile
@0xjeremyfrank
0xjeremyfrank / metadata.json
Created October 15, 2021 22:43
New Project
{"valueParameterInfo":[],"slotParameterDescriptions":[],"roleDescriptions":[],"contractType":"O","contractShortDescription":"","contractName":"","contractLongDescription":"","choiceInfo":[]}
@0xjeremyfrank
0xjeremyfrank / Constrained.Types.fs
Last active April 15, 2019 17:35
F# Signature File - Constrained Types
module StringConstraints
open System
let stringPattern str pattern =
if String.IsNullOrEmpty(str) then
let msg = sprintf "%s: Must not be null or empty" str
Error msg
elif System.Text.RegularExpressions.Regex.IsMatch(str, pattern) then
Ok (str)
else
let msg = sprintf "'%s' must match the pattern '%s'" str pattern