Sha256: aae82acf1eed60249c293761b3f2bf1fff19257f0f385a96a9ba879b76825850

Contents?: true

Size: 278 Bytes

Versions: 96

Compression:

Stored size: 278 Bytes

Contents

/* global test expect */

const objectify = require('../objectify')

test('Get object from a string path', () => {
  const object = { foo: { bar: { x: 1 } } }
  expect(objectify('foo.bar', object)).toEqual({ x: 1 })
  expect(objectify('some.bar', object)).toEqual(undefined)
})

Version data entries

96 entries across 95 versions & 13 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/package/utils/__tests__/objectify.js
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/package/utils/__tests__/objectify.js
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/package/utils/__tests__/objectify.js
optimacms-0.1.61 spec/dummy/node_modules/@rails/webpacker/package/utils/__tests__/objectify.js
jetpacker-0.7.0 package/utils/__tests__/objectify.js
webpacker-5.4.4 package/utils/__tests__/objectify.js
jetpacker-0.6.0 package/utils/__tests__/objectify.js
disco_app-0.18.0 test/dummy/node_modules/@rails/webpacker/package/utils/__tests__/objectify.js
disco_app-0.18.2 test/dummy/node_modules/@rails/webpacker/package/utils/__tests__/objectify.js
disco_app-0.16.1 test/dummy/node_modules/@rails/webpacker/package/utils/__tests__/objectify.js
disco_app-0.15.2 test/dummy/node_modules/@rails/webpacker/package/utils/__tests__/objectify.js
disco_app-0.18.4 test/dummy/node_modules/@rails/webpacker/package/utils/__tests__/objectify.js
disco_app-0.18.1 test/dummy/node_modules/@rails/webpacker/package/utils/__tests__/objectify.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/@rails/webpacker/package/utils/__tests__/objectify.js
disco_app-0.14.0 test/dummy/node_modules/@rails/webpacker/package/utils/__tests__/objectify.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/@rails/webpacker/package/utils/__tests__/objectify.js
webpacker-5.4.3 package/utils/__tests__/objectify.js
webpacker-5.4.2 package/utils/__tests__/objectify.js
webpacker-5.4.1 package/utils/__tests__/objectify.js
webpacker-5.4.0 package/utils/__tests__/objectify.js