Codota Logo For Javascript
_isObject
Code IndexAdd Codota to your IDE (free)

How to use
_isObject
function
in
lodash

Best JavaScript code snippets using lodash._isObject(Showing top 10 results out of 315)

origin: bitfinexcom/bitfinex-api-node

it('passes a debugger to the example', (done) => {
  runExample(getRunArgs(), async (args) => {
   assert.ok(_isObject(args), 'example not passed a tooling object')
   assert.ok(_isFunction(args.debug), 'example not passed a debug() instance')
   done()
  })
 })
origin: bitfinexcom/bitfinex-api-node

it('enableFlag: sends conf packet if open', async () => {
   ws = createTestWSv2Instance()
   wss = new MockWSv2Server()

   await ws.open()

   return new Promise((resolve) => {
    ws.send = (packet) => {
     assert(_isObject(packet))
     assert.strictEqual(packet.event, 'conf')
     resolve()
    }

    ws.enableFlag(WSv2.flags.SEQ_ALL)
   })
  })
origin: bitfinexcom/bitfinex-api-node

describe('subscribeOrderBook', () => {
  it('calls subscribe with a valid filter and the provided symbol', (done) => {
   m = new WS2Manager()
   m.subscribe = (type, symbol, filter) => {
    assert.ok(_isObject(filter), 'filter not an object')
    assert.strictEqual(filter.symbol, 'tBTCUSD', 'symbol did not match')
    assert.strictEqual(filter.prec, 'P0', 'prec did not match')
    assert.strictEqual(filter.len, '25', 'len did not match')
    assert.strictEqual(filter.freq, 'F0', 'freq did not match')
    assert.strictEqual(symbol, 'tBTCUSD')
    done()
   }

   m.subscribeOrderBook('tBTCUSD', 'P0', '25', 'F0')
  })
 })
origin: bitfinexcom/bitfinex-api-node

it('notifyUI: sends the correct UCM broadcast notification', (done) => {
   ws = createTestWSv2Instance()
   ws._isOpen = true
   ws._isAuthenticated = true
   ws.send = (msg = []) => {
    assert.deepStrictEqual(msg[0], 0)
    assert.deepStrictEqual(msg[1], 'n')
    assert.deepStrictEqual(msg[2], null)

    const data = msg[3]

    assert(_isObject(data))
    assert.deepStrictEqual(data.type, 'ucm-notify-ui')
    assert(_isObject(data.info))
    assert.deepStrictEqual(data.info.type, 'success')
    assert.deepStrictEqual(data.info.message, '42')
    done()
   }

   ws.notifyUI({ type: 'success', message: '42' })
  })
origin: bitfinexcom/bitfinex-api-node

describe('getSocketInfo', () => {
  it('returns an array of objects reporting number of data channels per socket', () => {
   m = new WS2Manager()

   m._sockets.push({
    pendingSubscriptions: [[], [], []],
    pendingUnsubscriptions: [[]],
    ws: { getDataChannelCount: () => 2 }
   })

   m._sockets.push({
    pendingSubscriptions: [[], [], []],
    pendingUnsubscriptions: [[]],
    ws: { getDataChannelCount: () => 3 }
   })

   const info = m.getSocketInfo()

   assert.ok(_isArray(info), 'did not return array')
   info.forEach(i => assert.ok(_isObject(i), 'socket info not an object'))
   assert.strictEqual(info[0].nChannels, 4, 'socket info does not report correct number of channels')
   assert.strictEqual(info[1].nChannels, 5, 'socket info does not report correct number of channels')
  })
 })
origin: bitfinexcom/bitfinex-api-node

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

assert.ok(_isObject(args), 'did not return an object')
assert(_isUndefined(args.apiKey), 'api key parsed although not present on env')
assert(_isUndefined(args.apiSecret), 'api secret parsed although not present on env')
assert.ok(_isObject(args), 'did not return an object')
assert.strictEqual(args.apiKey, '42', 'api key not pulled from env')
assert.strictEqual(args.apiSecret, '9000', 'api secret not pull from env')
assert.ok(_isObject(args), 'did not return an object')
assert.ok(_isUndefined(args.agent), 'agent provided although no config on env')
assert.ok(_isObject(args), 'did not return an object')
assert.ok(args.agent instanceof SocksProxyAgent, 'did not provide a SocksProxyAgent instance')
assert.ok(/localhost/.test(args.agent.proxy.host), 'provided agent does not use proxy url from env')
assert.ok(_isObject(args), 'did not return an object')
assert.ok(_isUndefined(args.url), 'url provided although no config on env')
assert.ok(_isObject(args), 'did not return an object')
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

describe('onOrderBook', () => {
  it('passes a valid OB filter to the first socket with a book channel', (done) => {
   const assertFilter = (filter) => {
    assert.ok(_isObject(filter), 'filter not an object')
    assert.strictEqual(filter.symbol, 'tBTCUSD', 'symbol did not match')
    assert.strictEqual(filter.prec, 'P0', 'prec did not match')
origin: bitfinexcom/bitfinex-api-node

describe('getSocketWithSubRef', () => {
  it('returns the first socket found that has the requested subscription ref', () => {
   m = new WS2Manager()

   for (let i = 0; i < 3; i += 1) {
    m._sockets.push({
     test: i,
     ws: {
      hasSubscriptionRef: (channel, identifier) => {
       assert.strictEqual(channel, 'a', 'did not pass channel through')
       assert.strictEqual(identifier, 'b', 'did not pass identifier through')
       return i === 1
      }
     }
    })
   }

   const s = m.getSocketWithSubRef('a', 'b')
   assert.ok(_isObject(s), 'did not return a socket')
   assert.strictEqual(s.test, 1, 'did not return correct socket')
  })
 })
origin: bitfinexcom/bitfinex-api-node

it('passes a specialized table logging function to the example', (done) => {
  runExample(getRunArgs(), async (args) => {
   assert.ok(_isObject(args), 'example not passed a tooling object')
   assert.ok(_isFunction(args.debugTable), 'example not passed a debugTable() instance')
   done()
  })
 })
lodash(npm)_isObject

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

  • lodash
    Lodash modular utilities.
  • postcss
  • handlebars
    Handlebars provides the power necessary to let you build semantic templates effectively with no frustration
  • winston
    A logger for just about everything.
  • colors
    get colors in your node.js console
  • bluebird
    Full featured Promises/A+ implementation with exceptionally good performance
  • rimraf
    A deep deletion module for node (like `rm -rf`)
  • request
    Simplified HTTP request client.
  • moment
    Parse, validate, manipulate, and display dates
  • Top plugins for WebStorm
    The challenge is finding the best plugins for JavaScript development on Intellij IDEs. Who wants to sit there and go over hundreds of plugins to pick the best?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJavascript Code Index
Get Codota for your IDE now