redux-search-filter
Version:
[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![npm download][download-image]][download-url]
13 lines (12 loc) • 354 B
JavaScript
export default class SearchFilter {
constructor(options) {
if (typeof options.name !== 'string') {
throw new TypeError('filter name must be a string');
}
if (typeof options.getData !== 'function') {
throw new TypeError('getData must be a function');
}
this.name = options.name;
this.getData = options.getData;
}
}