Functional composition with knockout observables made easy.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
dist
doc
src
test
.editorconfig
.eslintrc
.gitignore
.npmignore
LICENSE
README.md
circle.yml
package.json

README.md

Kompose

CircleCI branch npm

Kompose makes functional composition with knockout easier by providing lodash-esk helpers that handle observables.

These helpers compliment lodash and underscore by providing alternative functions for _.property, _.matchesProperty and others like them that traverse object paths. Lodash and underscore's methods do not work when any properties in the path is observable.

Kompose's only dependency is knockout.

Links

Example

var puppies = [
  { name: ko.observable('Django'), age: ko.observable({ years: 4, months: 2 }) },
  { name: ko.observable('Henry'), age: ko.observable({ years: 2, months: 6 }) }
];
_.map(puppies, kp.property('age.years'));
// => [4, 2]

See more in the docs.

Contributing

Don't be shy! Submit issues (or better yet PRs) if you see anything that could be better. If you're submitting code that contains patches or features please try to include unit tests. Thanks!

Author

Piet van Zoen hi@pietvanzoen.com

License