Remove lodash.throttle and replace underscore calls with lodash (#5946)

* remove lodash.throttle from dependency

* add babel-plugin-lodash'

* use lodash instead of underscore for isFunction

* switch underscore to lodash

* switch from underscore to lodash flatten

* Remove slugify and use kebabCase from lodash instead
This commit is contained in:
Krist Wongsuphasawat
2018-09-26 23:28:57 -07:00
committed by Maxime Beauchemin
parent 52033cbf2a
commit 4c21c65824
15 changed files with 19 additions and 41 deletions

View File

@@ -1,6 +1,5 @@
import { expect, assert } from 'chai';
import {
slugify,
formatSelectOptionsForRange,
d3format,
d3FormatPreset,
@@ -10,12 +9,6 @@ import {
} from '../../../src/modules/utils';
describe('utils', () => {
it('slugify slugifies', () => {
expect(slugify('My Neat Label! ')).to.equal('my-neat-label');
expect(slugify('Some Letters AnD a 5')).to.equal('some-letters-and-a-5');
expect(slugify(' 439278 ')).to.equal('439278');
expect(slugify('5')).to.equal('5');
});
it('formatSelectOptionsForRange', () => {
expect(formatSelectOptionsForRange(0, 4)).to.deep.equal([
[0, '0'],