All files / src/utils shallowSelect.js

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20                                  6x    
/**
* Copyright 2018, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
 
import { createSelectorCreator, defaultMemoize } from 'reselect';
import shallowEqual from './shallowEqual';
 
/**
 * A reselect selector with shallow identity comparison.
 * @param {function} input selectors
 * @param {function} result function
 * See also: https://github.com/reduxjs/reselect#createselectorinputselectors--inputselectors-resultfunc
 */
const shallowSelect = createSelectorCreator(defaultMemoize, shallowEqual);
export default shallowSelect;