Skip to content

Commit

Permalink
merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
bidoubiwa committed Sep 10, 2020
2 parents 9a27e63 + 6309ef5 commit ae43f3a
Show file tree
Hide file tree
Showing 4 changed files with 210 additions and 56 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const client = new MeiliSearch({
#### HTML Import <!-- omit in toc -->

```javascript
<script src="https://cdn.jsdelivr.net/npm/meilisearch@latest/dist/bundles/meilisearch.browser.js"></script>
<script src="https://cdn.jsdelivr.net/npm/meilisearch@latest/dist/bundles/meilisearch.umd.js"></script>
<script>
const client = new MeiliSearch({
host: 'http://127.0.0.1:7700',
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@
"@rollup/plugin-commonjs": "15.0.0",
"@rollup/plugin-json": "^4.0.2",
"@rollup/plugin-node-resolve": "9.0.0",
"@types/isomorphic-fetch": "^0.0.35",
"@types/jest": "26.0.10",
"@types/jest": "26.0.13",
"@types/prettier": "^2.0.0",
"@typescript-eslint/eslint-plugin": "2.34.0",
"@typescript-eslint/parser": "2.34.0",
Expand All @@ -72,7 +71,7 @@
"eslint-config-prettier": "^6.11.0",
"eslint-config-standard-with-typescript": "^17.0.0",
"eslint-plugin-import": "2",
"eslint-plugin-jest": "^23.18.0",
"eslint-plugin-jest": "^24.0.0",
"eslint-plugin-jsdoc": "^30.0.0",
"eslint-plugin-node": "11",
"eslint-plugin-prettier": "^3.1.4",
Expand All @@ -82,7 +81,7 @@
"jest": "^25.2.4",
"jest-watch-typeahead": "^0.5.0",
"kleur": "^4.0.0",
"lint-staged": "10.2.13",
"lint-staged": "10.3.0",
"prettier": "^2.0.2",
"pretty-bytes": "^5.3.0",
"rollup": "^2.2.0",
Expand Down
13 changes: 9 additions & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
function removeUndefinedFromObject(obj: object): object {
// remove undefined
const cleaned = Object.entries(obj).filter((x) => x[1] !== undefined)
return Object.fromEntries(cleaned)
/**
* Removes undefined entries from object
*/
function removeUndefinedFromObject(obj: Record<string, any>): object {
return Object.entries(obj).reduce((acc, curEntry) => {
const [key, val] = curEntry
if (val !== undefined) acc[key] = val
return acc
}, {} as Record<string, any>)
}

async function sleep(ms: number): Promise<void> {
Expand Down
Loading

0 comments on commit ae43f3a

Please sign in to comment.