Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
package main | |
// Require pcscd, libpcsclite | |
import ( | |
"bufio" | |
"bytes" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"strconv" |
const obj = { a: 1, c: 3, b: 2 } | |
// Map from object. | |
const myMap = new Map(Object.entries(obj)) | |
// Map to Object. | |
// NOTE: Keys will be cast to strings by `.toString`, so any "complex" key like for example `[1, 2]` will become `1,2` | |
const newObj = [...myMap.entries()] | |
.reduce((acc, [key, value]) => (Object.assign(acc, { [key]: value })), {}) |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
package join | |
import ( | |
"fmt" | |
"strings" | |
"testing" | |
) | |
var ( | |
testData = []string{"a", "b", "c", "d", "e"} |