Destructure Lodash requires

This commit is contained in:
Daniel Gasienica
2018-04-02 15:08:53 -04:00
parent b7b6195cfc
commit d9be6a0f94
13 changed files with 46 additions and 37 deletions

View File

@@ -1,5 +1,4 @@
const isFunction = require('lodash/isFunction');
const isString = require('lodash/isString');
const { isFunction, isString } = require('lodash');
const MIME = require('./mime');
const { arrayBufferToBlob, blobToArrayBuffer, dataURLToBlob } = require('blob-util');

View File

@@ -1,7 +1,9 @@
const isArrayBuffer = require('lodash/isArrayBuffer');
const isFunction = require('lodash/isFunction');
const isUndefined = require('lodash/isUndefined');
const omit = require('lodash/omit');
const {
isArrayBuffer,
isFunction,
isUndefined,
omit,
} = require('lodash');
// type Context :: {

View File

@@ -1,4 +1,4 @@
const isFunction = require('lodash/isFunction');
const { isFunction } = require('lodash');
const Attachment = require('./attachment');
const Errors = require('./errors');

View File

@@ -1,4 +1,4 @@
const isNumber = require('lodash/isNumber');
const { isNumber } = require('lodash');
exports.isValid = value =>