arj03 / knockout.wrap Goto Github PK
View Code? Open in Web Editor NEWSimple fast js to ko and ko to js mapper
Simple fast js to ko and ko to js mapper
I understand knockout.wrap doesn't create observable for objects so it also doesn't unwrap them.
But let's say I have a custom model that I simply want to unwrap so to log my JS (or post it to the server as JSON), I would expect it to dewrap everything!
See the differences in default dewrapping between this plugin and another "fast mapper" plugin
http://jsbin.com/qupijoquwabi/1/
The "known issue" link points to http://daringfireball.net/projects/markdown/ in the README instead of the knockout.js issue.
Does this work with Knockout 2.2.1?
In my case it converts only a few properties to JS in ko.wrap.toJS.
Rest all properties are ignored. It is working till version knockout 2.0.0.
So how do you use it with all the features
of ko.mapping?
i.e. to ignore
some elements, to control the create
, update
or children
, copy
, observe
, include
and so on.
Maybe your is way faster, but it also seem way featureless. Am I wrong?
It would be nice to have this set up as a NuGet package, if possible. A pretty large chunk of folks are using NuGet to get everything else.
Just a thought.
I wanted to use ko.wrap.updateFromJS in following way:
ko.wrap.updateFromJS (newNode, options, mappingData);
where mappingData
is data which I have to map to existing newNode
object of my custom class. I was not able to to it, as for some reason updateFromJS
expect that newNode
is observable. It's not true in my case.
How can I overcome this trouble?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.