Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/denorg/invert-kv
🙃 Invert key-value pairs in an object, e.g., { foo: "bar" } → { bar: "foo" }
https://github.com/denorg/invert-kv
deno denoland denorg key-value object typescript
Last synced: about 1 month ago
JSON representation
🙃 Invert key-value pairs in an object, e.g., { foo: "bar" } → { bar: "foo" }
- Host: GitHub
- URL: https://github.com/denorg/invert-kv
- Owner: denorg
- License: mit
- Created: 2020-05-14T23:10:21.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-01T11:52:50.000Z (over 4 years ago)
- Last Synced: 2024-10-28T12:15:29.615Z (about 2 months ago)
- Topics: deno, denoland, denorg, key-value, object, typescript
- Language: TypeScript
- Homepage: https://denorg.github.io/invert-kv/
- Size: 14.6 KB
- Stars: 3
- Watchers: 6
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-deno - invert-kv - Invert key-value pairs in Deno.![GitHub stars](https://img.shields.io/github/stars/denorg/invert-kv?style=plastic) (Modules / Online Playgrounds)
- awesome-deno - invert-kv - Invert key-value pairs in Deno. (Modules / Utils)
- awesome-deno-cn - @denorg/invert-kv
README
# 🙃 Invert KV
Invert the key-value pairs in an object in Deno. This is a port of [sindresorhus/invert-kv](https://github.com/sindresorhus/invert-kv).
[![Deno CI](https://github.com/denorg/invert-kv/workflows/Deno%20CI/badge.svg)](https://github.com/denorg/invert-kv/actions)
[![GitHub](https://img.shields.io/github/license/denorg/invert-kv)](https://github.com/denorg/invert-kv/blob/master/LICENSE)
[![Contributors](https://img.shields.io/github/contributors/denorg/invert-kv)](https://github.com/denorg/invert-kv/graphs/contributors)
[![Deno Starter](https://img.shields.io/badge/deno-starter-brightgreen)](https://denorg.github.io/starter/)
[![Made by Denorg](https://img.shields.io/badge/made%20by-denorg-0082fb)](https://github.com/denorg)
[![TypeScript](https://img.shields.io/badge/types-TypeScript-blue)](https://github.com/denorg/invert-kv)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)```ts
import { invert } from "https://deno.land/x/invert_kv/mod.ts";const obj = { hello: "world" };
const result = invert(); // { world: "hello" }
```## 👩💻 Development
Run tests:
```bash
deno test
```## 📄 License
MIT © [Denorg](https://den.org.in)
A project by Denorg, the world's first Deno-focused community
organization and consulting company. Work with us →