{"modulePath":"github.com/algolia/cli","version":"v1.18.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package utils\n\n## Variables\n\n```go\nvar IsTerminal = func(f *os.File) bool {\n\treturn isatty.IsTerminal(f.Fd()) || IsCygwinTerminal(f)\n}\n```\n\n```go\nvar TerminalSize = func(w interface{}) (int, int, error) {\n\tif f, isFile := w.(*os.File); isFile {\n\t\treturn term.GetSize(int(f.Fd()))\n\t}\n\n\treturn 0, 0, fmt.Errorf(\"%v is not a file\", w)\n}\n```\n\n## Functions\n\n```go\nfunc Contains(s []string, e string) bool\n```\nContains check if a slice contains a given string\n\n```go\nfunc Differences(a, b []string) []string\n```\nDifferences return the elements in \\`a\\` that aren't in \\`b\\`\n\n```go\nfunc IsCI() bool\n```\nbased on [https://github.com/watson/ci-info/blob/HEAD/index.js](https://github.com/watson/ci-info/blob/HEAD/index.js)\n\n```go\nfunc IsCygwinTerminal(f *os.File) bool\n```\n\n```go\nfunc MakePath(path string) error\n```\nMakePath creates a path if it doesn't exist\n\n```go\nfunc Pluralize(num int, thing string) string\n```\nPluralize returns the plural form of a given string\n\n```go\nfunc SliceToReadableString(str []string) string\n```\nConvert slice of string to a readable string eg: \\[\"one\", \"two\", \"three\"] -\u003e \"one, two and three\"\n\n```go\nfunc SliceToString(str []string) string\n```\nConvert slice of string to comma separated string\n\n```go\nfunc StringToSlice(str string) []string\n```\nConvert comma separated string values to slice\n\n```go\nfunc ToKebabCase(str string) string\n```\nToKebabCase converts a string to kebab case\n\n","path":"github.com/algolia/cli/pkg/utils","name":"utils","synopsis":"","isRedistributable":true}
