knockout-kompose

0.1.3 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i knockout-kompose

Weekly Downloads

0

Version

0.1.3

License

MIT

Last publish

Collaborators

  • pietvanzoen