Tabnine Logo For Javascript
_isEmpty
Code IndexAdd Tabnine to your IDE (free)

How to use
_isEmpty
function
in
lodash

Best JavaScript code snippets using lodash._isEmpty(Showing top 15 results out of 315)

origin: bitfinexcom/bitfinex-api-node

describe('default connection url', () => {
  it('is a static member on the class', () => {
   assert.ok(_isString(WSv2.url) && !_isEmpty(WSv2.url))
  })
 })
origin: bitfinexcom/bitfinex-api-node

const validArg = v => _isString(v) && !_isEmpty(v)
origin: bitfinexcom/bitfinex-api-node

/**
  * @private
  */
 _onWSOpen () {
  this._isOpen = true
  this._isReconnecting = false
  this._packetWDLastTS = Date.now()
  this._lastAuthSeq = -1
  this._lastPubSeq = -1
  this.emit('open')

  if (!_isEmpty(this._prevChannelMap)) {
   this.resubscribePreviousChannels()
   this._prevChannelMap = {}
  }

  debug('connection open')
 }
origin: stitchng/paystack

/*!
 *
 * Provides a convenience extension to _.isEmpty which allows for
 * determining an object as being empty based on either the default
 * implementation or by evaluating each property to undefined, in
 * which case the object is considered empty.
 */
_.mixin(function () {
 // reference the original implementation
 var _isEmpty = _.isEmpty
 return {
  // If defined is true, and value is an object, object is considered
  // to be empty if all properties are undefined, otherwise the default
  // implementation is invoked.
  isEmpty: function (value, defined) {
   if (defined && _.isObject(value)) {
    return !_.some(value, function (value, key) {
     return value !== undefined
    })
   }
   return _isEmpty(value)
  }
 }
}())
origin: bitfinexcom/bitfinex-api-node

/**
  * @param {Array} payload - payload to verify
  * @param {object} filter - filter to match against payload
  * @returns {boolean} pass
  * @private
  */
 static _payloadPassesFilter (payload, filter) {
  const filterIndices = Object.keys(filter)
  let filterValue

  for (let k = 0; k < filterIndices.length; k++) {
   filterValue = filter[filterIndices[k]]

   if (_isEmpty(filterValue) || filterValue === '*') {
    continue
   }

   if (payload[+filterIndices[k]] !== filterValue) {
    return false
   }
  }

  return true
 }
origin: bitfinexcom/bitfinex-api-node

const orders = _isEmpty(filterByMarket)
 ? allOrders
 : allOrders.filter(o => o.symbol === filterByMarket)
origin: bitfinexcom/bitfinex-api-node

 const initAuthArgs = ws.getAuthArgs()
 assert(_isObject(initAuthArgs) && _isEmpty(initAuthArgs))
})
origin: bitfinexcom/bitfinex-api-node

const { market, tf } = params
if (_isEmpty(market)) throw new Error('market required')
if (_isEmpty(tf)) throw new Error('time frame required')
origin: bitfinexcom/bitfinex-api-node

 assert.ok(_isString(args.url) && !_isEmpty(args.url), 'connection url not pulled from env')
 assert.strictEqual(args.url, url, 'provided url does not match env var')
})
origin: bitfinexcom/bitfinex-api-node

const { market } = params
if (_isEmpty(market)) {
 return debug('market required')
origin: bitfinexcom/bitfinex-api-node

const orders = _isEmpty(filterByMarket)
 ? allOrders
 : allOrders.filter(o => o.symbol === filterByMarket)
origin: bitfinexcom/bitfinex-api-node

const { filterByMarket } = params
const allPositions = await rest.positions()
const positions = _isEmpty(filterByMarket)
 ? allPositions
 : allPositions.filter(({ symbol }) => symbol === filterByMarket)
origin: bitfinexcom/bitfinex-api-node

const { market } = params
if (_isEmpty(market)) {
 throw new Error('market required')
origin: bitfinexcom/bitfinex-api-node

const { market } = params
if (_isEmpty(market)) {
 throw new Error('market required')
origin: bitfinexcom/bitfinex-api-node

const { symbol } = params
if (_isEmpty(symbol)) {
 return debug('symbol required')
lodash(npm)_isEmpty

Most used lodash functions

  • LoDashStatic.map
    Creates an array of values by running each element in collection through iteratee. The iteratee is
  • LoDashStatic.isEmpty
    Checks if value is empty. A value is considered empty unless it’s an arguments object, array, string
  • LoDashStatic.forEach
    Iterates over elements of collection invoking iteratee for each element. The iteratee is invoked wit
  • LoDashStatic.find
    Iterates over elements of collection, returning the first element predicate returns truthy for.
  • LoDashStatic.pick
    Creates an object composed of the picked `object` properties.
  • LoDashStatic.get,
  • LoDashStatic.isArray,
  • LoDashStatic.filter,
  • LoDashStatic.merge,
  • LoDashStatic.isString,
  • LoDashStatic.isFunction,
  • LoDashStatic.assign,
  • LoDashStatic.extend,
  • LoDashStatic.includes,
  • LoDashStatic.keys,
  • LoDashStatic.cloneDeep,
  • LoDashStatic.uniq,
  • LoDashStatic.isObject,
  • LoDashStatic.omit

Popular in JavaScript

  • through2
    A tiny wrapper around Node.js streams.Transform (Streams2/3) to avoid explicit subclassing noise
  • aws-sdk
    AWS SDK for JavaScript
  • postcss
  • fs
  • body-parser
    Node.js body parsing middleware
  • ms
    Tiny millisecond conversion utility
  • async
    Higher-order functions and common patterns for asynchronous code
  • fs-extra
    fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.
  • mocha
    simple, flexible, fun test framework
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now