default-composer

A tiny (~500B) JavaScript library that allows you to set default values for nested objects

MIT License

Downloads
12.3K
Stars
464
Committers
5

Bot releases are visible (Hide)

default-composer - 0.6.0 Latest Release

Published by aralroca 11 months ago

BREAKING CHANGE

Now mergeArrays configuration option also merges the objects inside the arrays.

  • default: { someArray: [ {a: 1} , { c: 2 }] }
  • data: { someArray: [ {b: 3} ] }
  • result { someArray: [ {a: 1, b: 3}, {c: 2} ] }

What's Changed

Full Changelog: https://github.com/aralroca/default-composer/compare/0.5.4...0.6.0

default-composer - 0.5.4

Published by aralroca 11 months ago

default-composer - 0.5.2

Published by aralroca 11 months ago

What's Changed

Full Changelog: https://github.com/aralroca/default-composer/compare/0.5.1...0.5.2

default-composer - 0.5.1

Published by aralroca over 1 year ago

default-composer - 0.5.0

Published by aralroca over 1 year ago

What's Changed

Full Changelog: https://github.com/aralroca/default-composer/compare/0.4.1...0.5.0

default-composer - 0.4.1

Published by aralroca over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/aralroca/default-composer/compare/0.4.0...0.4.1

default-composer - 0.4.0

Published by aralroca over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/aralroca/default-composer/compare/0.3.1...0.4.0

default-composer - 0.3.1

Published by aralroca over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/aralroca/default-composer/compare/0.3.0...0.3.1

default-composer - 0.3.0

Published by aralroca over 1 year ago

What's Changed

Migrate from 0.2.x

Change setConfig({ emptyChecker }) to setConfig({ isDefaultableValue })

Full Changelog: https://github.com/aralroca/default-composer/compare/0.2.0...0.3.0

default-composer - 0.2.0

Published by aralroca over 1 year ago

What's Changed

How to migrate from 0.1.x:

Instead of:

import defaultComposer from "default-composer";

You can do:

import { defaultComposer, setConfig } from "default-composer";

Full Changelog: https://github.com/aralroca/default-composer/compare/0.1.3...0.2.0

default-composer - 0.1.3

Published by aralroca over 1 year ago

default-composer - 0.1.2

Published by aralroca over 1 year ago

default-composer - 0.1.1

Published by aralroca over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/aralroca/default-composer/compare/0.1.0...0.1.1

default-composer - 0.1.0

Published by aralroca over 1 year ago

Package Rankings
Top 15.63% on Npmjs.org
Badges
Extracted from project README
npm version gzip size CI Status Maintenance Status Weekly downloads PRs Welcome All Contributors