-
omit
- called on searchState
- likely can use the babel version or spread instead
-
isEqual
- only three usages
- deep equal on props
-
used in maps too
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = mitt; | |
/** | |
* Remove an element from an array, if it occurs | |
* | |
* @param {Array<T>} array list to modify | |
* @param {T} element element to find and remove from the array | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import connectReal from '../somewhere'; | |
jest.mock( | |
'../../internal/used-in-somewhere', | |
() => (connector: ConnectorDescription) => connector | |
); | |
// would like this to be ConnectorDescription, since the mock made it that | |
const connect: any = connectReal; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import 'reset.scss'; | |
// Colors | |
$algolia-blue: darken(rgb(0, 174, 255), 7%); | |
$ghost: rgb(196, 200, 216); | |
$east-bay: rgb(73, 85, 136); | |
$koromiko: rgb(255, 193, 104); | |
$port-gore: rgb(58, 69, 112); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.algoliasearchHelper = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
'use strict'; | |
var AlgoliaSearchHelper = require('./src/algoliasearch.helper'); | |
var SearchParameters = require('./src/SearchParameters'); | |
var SearchResults = requi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file | lodash function | done | PR | |
---|---|---|---|---|
src/SearchResults/index.js | compact | x | https://github.com/algolia/algoliasearch-helper-js/pull/689 | |
src/SearchResults/index.js | findIndex | x | https://github.com/algolia/algoliasearch-helper-js/pull/687 | |
src/SearchResults/index.js | sumBy | x | https://github.com/algolia/algoliasearch-helper-js/pull/688 | |
src/SearchResults/index.js | find | x | https://github.com/algolia/algoliasearch-helper-js/pull/687 | |
src/SearchResults/index.js | orderBy | x | https://github.com/algolia/algoliasearch-helper-js/pull/698 | |
src/SearchResults/index.js | defaults | x | https://github.com/algolia/algoliasearch-helper-js/pull/692 | |
src/SearchResults/index.js | merge | x | https://github.com/algolia/algoliasearch-helper-js/pull/694 | |
src/SearchResults/index.js | isFunction | x | https://github.com/algolia/algoliasearch-helper-js/pull/656 | |
src/SearchResults/index.js | partial | x | https://github.com/algolia/algoliasearch-helper-js/pull/693 |
We are preparing to integrate the Helper directly inside InstantSearch, and for this are making some breaking changes. If you are happy using the current version of the Helper, there's no pressing need for you to upgrade to the next version.
We have fully migrated away from lodash in v3. This means that there are some cases which used to accept incorrect shapes (objects where it should be arrays) will throw errors now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable react/prop-types, require-await, no-console */ | |
import ReactDOM from 'react-dom'; | |
import React, { | |
useEffect, | |
useState, | |
useRef, | |
createContext, | |
useContext, | |
} from 'react'; | |
import instantsearch from '../es'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<!-- container for places.js --> | |
<div> | |
<div id="algolia-places" /> | |
</div> | |
</template> | |
<script> | |
import { createWidgetMixin } from 'vue-instantsearch'; | |
import places from 'places.js'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tree = indexWidget => indexWidget.getWidgets().map(widget => widget.$$type === 'ais.index' ? { ...widget, children: tree(widget) } : widget); | |
// usage: | |
tree(search.mainIndex) |