Skip to content

revilossor/json-mapper

Repository files navigation

Json Mapper

Maps one json structure to another, according to a declared specification.

const globals = { time: Date.now() }

const mapper = JsonMapper.fromString(`{
  input / .
  createdAt / ^..&.time
}`, globals)

const output = mapper.map({ some: 'input' })

console.dir(output) // { createdAt: <Date.now()>, input: { some: 'input' } }

Please see the documentation for more info.

About

A declarative way to transform JSON

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published