emoji

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Has added in v0.3.0

func Has(str string) bool

func HasCharacter added in v0.3.0

func HasCharacter(str string) bool

func HasShortcode added in v0.2.0

func HasShortcode(str string) bool

func ToString added in v0.9.0

func ToString(p Profile) string

func ToURL added in v0.9.0

func ToURL(p Profile) string

func WithEmojiSet added in v0.3.0

func WithEmojiSet(p Profile) func(*Set)

Types

type Emoji

type Emoji struct {
	Name        string `json:"name"`
	Character   string `json:"emoji"`
	Description string `json:"description"`
	Characters  int    `json:"characters"`
	Codepoint   string `json:"codepoint"`
	Hex         string `json:"hex"`
	Shortcode   string `json:"shortcode"`
	Variant     bool   `json:"variant"`
	ZWJ         bool   `json:"zwj"`
}

type NullEmoji added in v0.3.0

type NullEmoji struct {
	Valid bool
	Emoji Emoji
}

type Profile added in v0.3.0

type Profile int
const (
	DefaultProfile Profile = iota
	CommittedProfile
	GitmojiProfile
	DevmojiProfile
	EmojiLogProfile
	ProfileCount
)

type Set added in v0.3.0

type Set struct {
	Name   string
	Emojis []Emoji
	// contains filtered or unexported fields
}

func New

func New(opts ...func(*Set)) *Set

func (*Set) Find added in v0.3.0

func (es *Set) Find(str string) NullEmoji

func (*Set) FindByCharacter added in v0.3.0

func (es *Set) FindByCharacter(str string) NullEmoji

func (*Set) FindByShortcode added in v0.3.0

func (es *Set) FindByShortcode(str string) NullEmoji

func (*Set) ListProfiles added in v0.9.0

func (es *Set) ListProfiles() []Profile

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL