Skip to content

Commit a21e54f

Browse files
committed
docs: Rebuilt readme with tldw
1 parent 125ba69 commit a21e54f

File tree

1 file changed

+36
-13
lines changed

1 file changed

+36
-13
lines changed

readme.md

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# array-to-object-keys
22

33

4-
<a href="https://raw.githubusercontent.com/jaid/array-to-object-keys/master/license.txt"><img src="https://img.shields.io/github/license/jaid/array-to-object-keys?style=flat-square" alt="License"/></a> <a href="https://github.com/sponsors/jaid"><img src="https://img.shields.io/badge/<3-Sponsor-FF45F1?style=flat-square" alt="Sponsor array-to-object-keys"/></a>
4+
<a href="https://raw.githubusercontent.com/jaid/array-to-object-keys/master/license.txt"><img src="https://img.shields.io/github/license/jaid/array-to-object-keys?style=flat-square" alt="License"/></a> <a href="https://github.com/sponsors/jaid"><img src="https://img.shields.io/badge/<3-Sponsor-FF45F1?style=flat-square" alt="Sponsor array-to-object-keys"/></a>
55
<a href="https://actions-badge.atrox.dev/jaid/array-to-object-keys/goto"><img src="https://img.shields.io/endpoint.svg?style=flat-square&url=https%3A%2F%2Factions-badge.atrox.dev%2Fjaid%2Farray-to-object-keys%2Fbadge" alt="Build status"/></a> <a href="https://github.com/jaid/array-to-object-keys/commits"><img src="https://img.shields.io/github/commits-since/jaid/array-to-object-keys/v1.3.5?style=flat-square&logo=github" alt="Commits since v1.3.5"/></a> <a href="https://github.com/jaid/array-to-object-keys/commits"><img src="https://img.shields.io/github/last-commit/jaid/array-to-object-keys?style=flat-square&logo=github" alt="Last commit"/></a> <a href="https://github.com/jaid/array-to-object-keys/issues"><img src="https://img.shields.io/github/issues/jaid/array-to-object-keys?style=flat-square&logo=github" alt="Issues"/></a>
66
<a href="https://npmjs.com/package/array-to-object-keys"><img src="https://img.shields.io/npm/v/array-to-object-keys?style=flat-square&logo=npm&label=latest%20version" alt="Latest version on npm"/></a> <a href="https://github.com/jaid/array-to-object-keys/network/dependents"><img src="https://img.shields.io/librariesio/dependents/npm/array-to-object-keys?style=flat-square&logo=npm" alt="Dependents"/></a> <a href="https://npmjs.com/package/array-to-object-keys"><img src="https://img.shields.io/npm/dm/array-to-object-keys?style=flat-square&logo=npm" alt="Downloads"/></a>
77

@@ -11,28 +11,45 @@
1111

1212

1313

14+
## Installation
1415

16+
<a href="https://npmjs.com/package/array-to-object-keys"><img src="https://img.shields.io/badge/npm-array--to--object--keys-C23039?style=flat-square&logo=npm" alt="array-to-object-keys on npm"/></a>
1517

18+
```bash
19+
npm install --save array-to-object-keys@^1.3.5
20+
```
1621

22+
<a href="https://yarnpkg.com/package/array-to-object-keys"><img src="https://img.shields.io/badge/Yarn-array--to--object--keys-2F8CB7?style=flat-square&logo=yarn&logoColor=white" alt="array-to-object-keys on Yarn"/></a>
1723

24+
```bash
25+
yarn add array-to-object-keys@^1.3.5
26+
```
1827

28+
<a href="https://github.com/jaid/array-to-object-keys/packages"><img src="https://img.shields.io/badge/GitHub Packages-@jaid/array--to--object--keys-24282e?style=flat-square&logo=github" alt="@jaid/array-to-object-keys on GitHub Packages"/></a>
29+
(if [configured properly](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-npm-for-use-with-github-packages))
1930

31+
```bash
32+
npm install --save @jaid/array-to-object-keys@^1.3.5
33+
```
2034

2135

2236

37+
## Example
2338

24-
## Installation
25-
<a href="https://npmjs.com/package/array-to-object-keys"><img src="https://img.shields.io/badge/npm-array--to--object--keys-C23039?style=flat-square&logo=npm" alt="array-to-object-keys on npm"/></a>
26-
```bash
27-
npm install --save array-to-object-keys@^1.3.5
28-
```
29-
<a href="https://yarnpkg.com/package/array-to-object-keys"><img src="https://img.shields.io/badge/Yarn-array--to--object--keys-2F8CB7?style=flat-square&logo=yarn&logoColor=white" alt="array-to-object-keys on Yarn"/></a>
30-
```bash
31-
yarn add array-to-object-keys@^1.3.5
39+
```javascript
40+
import arrayToObjectKeys from "array-to-object-keys"
41+
42+
const array = ["a", "b"]
43+
const result = arrayToObjectKeys(array, (key, index) => `value for ${key} #${index + 1}`)
3244
```
33-
<a href="https://jsdelivr.com/package/npm/array-to-object-keys/"><img src="https://img.shields.io/badge/jsDelivr-array--to--object--keys-orange?style=flat-square&logo=html5&logoColor=white" alt="array-to-object-keys on jsDelivr"/></a> <a href="https://unpkg.com/browse/array-to-object-keys/"><img src="https://img.shields.io/badge/UNPKG-array--to--object--keys-orange?style=flat-square&logo=html5&logoColor=white" alt="array-to-object-keys on UNPKG"/></a>
34-
```html
35-
<script src="https://cdn.jsdelivr.net/npm/array-to-object-keys@1.3.5/index.js"/>
45+
46+
Variable `result` will now be:
47+
48+
```javascript
49+
{
50+
a: "value for a #1",
51+
b: "value for b #2",
52+
}
3653
```
3754

3855

@@ -41,6 +58,12 @@ yarn add array-to-object-keys@^1.3.5
4158

4259

4360

61+
62+
63+
64+
65+
66+
4467
## Development
4568

4669

@@ -65,7 +88,7 @@ npm run test
6588
```text
6689
MIT License
6790
68-
Copyright © 2019, Jaid <jaid.jsx@gmail.com> (github.com/jaid)
91+
Copyright © 2020, Jaid <jaid.jsx@gmail.com> (github.com/jaid)
6992
7093
Permission is hereby granted, free of charge, to any person obtaining a copy
7194
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)