object
Object module - Safe, composable object manipulation utilities.
Provides utilities for flattening, transforming, validating, and safely accessing nested object structures. All operations are immutable and integrate with Result/Option patterns for type-safe error handling.
Example
import * as Obj from 'receta/object'
import { pipe } from 'remeda'
// Flatten and transform
const flat = Obj.flatten({ user: { name: 'Alice' } })
// => { 'user.name': 'Alice' }
// Safe nested access
const host = Obj.getPath(config, ['database', 'host'])
// => Option<string>
// Validation
const result = Obj.validateShape(input, schema)
// => Result<User, ObjectError>
References
compact
Re-exports compact
deepMerge
Re-exports deepMerge
DeepMergeOptions
Re-exports DeepMergeOptions
DeepPartial
Re-exports DeepPartial
filterKeys
Re-exports filterKeys
filterValues
Re-exports filterValues
FlatObject
Re-exports FlatObject
flatten
Re-exports flatten
FlattenOptions
Re-exports FlattenOptions
getPath
Re-exports getPath
KeysOfType
Re-exports KeysOfType
KeyTransform
Re-exports KeyTransform
mapKeys
Re-exports mapKeys
mapValues
Re-exports mapValues
mask
Re-exports mask
ObjectError
Re-exports ObjectError
ObjectPath
Re-exports ObjectPath
ObjectSchema
Re-exports ObjectSchema
PathValue
Re-exports PathValue
PlainObject
Re-exports PlainObject
rename
Re-exports rename
setPath
Re-exports setPath
stripEmpty
Re-exports stripEmpty
StripEmptyOptions
Re-exports StripEmptyOptions
stripUndefined
Re-exports stripUndefined
transformKeys
Re-exports transformKeys
TransformKeysOptions
Re-exports TransformKeysOptions
unflatten
Re-exports unflatten
UnflattenOptions
Re-exports UnflattenOptions
updatePath
Re-exports updatePath
validateShape
Re-exports validateShape