dot-prop

Get, set, or delete a property from a nested object using a dot path

MIT License

Downloads
77.2M
Stars
791
Committers
24

Bot releases are hidden (Show)

dot-prop - Latest Release

Published by sindresorhus over 1 year ago

  • Fix handling of sparse arrays (#110) e314e80

https://github.com/sindresorhus/dot-prop/compare/v8.0.1...v8.0.2

dot-prop -

Published by sindresorhus over 1 year ago

  • Fix deepKeys to not throw on sparse arrays f21b68e

https://github.com/sindresorhus/dot-prop/compare/v8.0.0...v8.0.1

dot-prop -

Published by sindresorhus over 1 year ago

Breaking

  • Require Node.js 16 a8b3bbd

Improvements

  • Make deepKeys() include empty arrays and objects (#105) 49e9082

https://github.com/sindresorhus/dot-prop/compare/v7.2.0...v8.0.0

dot-prop -

Published by sindresorhus over 2 years ago

  • Add deepKeys() (#94) 3902c64
  • Fix TypeScript types (#92) 2c1bbfb

https://github.com/sindresorhus/dot-prop/compare/v7.1.1...v7.2.0

dot-prop -

Published by sindresorhus over 2 years ago

  • Fix crash when modifying array length (#89) d363922

https://github.com/sindresorhus/dot-prop/compare/v7.1.0...v7.1.1

dot-prop -

Published by sindresorhus over 2 years ago

dot-prop -

Published by sindresorhus over 2 years ago

Breaking

  • This package is now pure ESM. Please read this.
  • Require Node.js 12 5a83242
  • Require TypeScript 4.1 for the types (#80) 09adad9
  • Accessing array indices were never documented in previous versions, but it worked as 'a.0'. This no longer works. Use 'a[0]' instead.
  • The package now enforces named exports and renamed the methods:
    • const {get} = require('dot-prop')import {getProperty} from 'dot-prop'
    • const {set} = require('dot-prop')import {setProperty} from 'dot-prop'
    • const {has} = require('dot-prop')import {hasProperty} from 'dot-prop'
    • const {delete: delete_} = require('dot-prop')import {deleteProperty} from 'dot-prop'

Improvements

  • Support array indexes (#82) d64e27b
  • Add strongly-typed TypeScript types (#80) 09adad9
  • Return default value if path is invalid (#86) d400c8d

https://github.com/sindresorhus/dot-prop/compare/v6.0.1...v7.0.0

dot-prop -

Published by sindresorhus almost 4 years ago

  • Fix default value issue when last part of part of path is undefined (#75) dcc7f73

https://github.com/sindresorhus/dot-prop/compare/v6.0.0...v6.0.1

dot-prop -

Published by sindresorhus about 4 years ago

Breaking

  • Require Node.js 10 5840717
  • Allow getting non-enumerable properties (#54) cbd7074

https://github.com/sindresorhus/dot-prop/compare/v5.3.0...v6.0.0

dot-prop -

Published by sindresorhus about 4 years ago

  • Make .delete() return a boolean (#66) 24916ff

https://github.com/sindresorhus/dot-prop/compare/v5.2.0...v5.3.0

dot-prop -

Published by sindresorhus about 4 years ago

dot-prop -

Published by sindresorhus almost 5 years ago

  • Allow specifying undefined as the object for .get() and .has() (#58) a6be343

https://github.com/sindresorhus/dot-prop/compare/v5.1.1...v5.2.0

dot-prop -

Published by sindresorhus almost 5 years ago

  • Prevent setting/getting some problematic path components 3039c8c
  • TypeScript - Fix return type for undefined defaultValue (#56) e0f8abf

https://github.com/sindresorhus/dot-prop/compare/v5.1.0...v5.1.1

dot-prop -

Published by sindresorhus over 5 years ago

Maintenance release to update dependencies. No user-facing changes.

https://github.com/sindresorhus/dot-prop/compare/v5.0.1...v5.1.0

dot-prop -

Published by sindresorhus over 5 years ago

  • Fix TypeScript 3.5 compatibility 9c1ef03

https://github.com/sindresorhus/dot-prop/compare/v5.0.0...v5.0.1

dot-prop -

Published by sindresorhus over 5 years ago

Breaking:

  • Require Node.js 8 a19fd41

Enhancements:

  • Add TypeScript definition (#52) 5dbf51c

https://github.com/sindresorhus/dot-prop/compare/v4.2.0...v5.0.0