atomic-fns 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,11 +23,11 @@ export const randomInt = (min = 0, max = 1) => Math.round(random(min, max));
23
23
  * @returns {T}
24
24
  * @template T
25
25
  */
26
- export const choice = (arr) => {
26
+ export function choice(arr) {
27
27
  if (!arr?.length)
28
28
  return;
29
29
  return arr[randomInt(0, arr.length - 1)];
30
- };
30
+ }
31
31
  /**
32
32
  * Returns a random sample of size k from a list of items.
33
33
  * @param {Array} arr
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "atomic-fns",
3
3
  "description": "Like Lodash, but for ESNext and with types. Stop shipping code built for browsers from 2015.",
4
- "version": "0.4.2",
4
+ "version": "0.4.3",
5
5
  "files": [
6
6
  "dist/*"
7
7
  ],