Skip to content

stanleynguyen/is-thirteen

Repository files navigation

Logo

is-thirteen

go.dev reference codecov Go Report Card

Check if a number is equal to 13. A port of this NPM module.

Installation

go get -u github.com/stanleynguyen/is-thirteen

Usage

package main

import "github.com/stanleynguyen/is-thirteen"

func main() {
	is.Number(13).Thirteen()               // true
	is.Number(12.8).Roughly.Thirteen()     // true
	is.Number(6).Within(10).Of.Thirteen()  // true
	is.Number(2007).YearOfBirth.Thirteen() // true

	// check your math skillz
	is.Number(4).Plus(5).Thirteen()     // false
	is.Number(12).Plus(1).Thirteen()    // true
	is.Number(4).Minus(12).Thirteen()   // false
	is.Number(14).Minus(1).Thirteen()   // true
	is.Number(1).Times(8).Thirteen()    // false
	is.Number(26).Divides(2).Thirteen() // true

	// check your spelling and chemistry skillz
	is.String("tHirTeEn").Thirteen()              // true
	is.String("nethtire").AnagramOf.Thirteen()    // true
	is.String("neetriht").Backwards.Thirteen()    // true
	is.String("aLumInUm").AtomicNumber.Thirteen() // true
}

Check out pkg.go.dev for the full documentation.