Closed jamesplease closed 9 years ago
Thanks. I'm familiar with AMD (though not it's biggest fan); haven't encountered UMD before, but it sounds suitable.
Making it work in the browser (at least the modern ones) should be trivial. The demo uses the differ in the browser.
And you might take a look at rfc6902/build.js and browserify.
As of v1.0.x
, which is built with browserify, it is now trivial to use rfc6902
in the browser. Simply add "rfc6902": "~1.0.2"
to your package.json
dependencies, call var rfc6902 = require('rfc6902')
as usual in your client-side code, and use browserify to bundle your app.js.
Or load the compiled dist.js
file in a <script src="dist.js"></script>
, and it will import the rfc6902
library as a global variable named rfc6902
.
Hey @chbrown, nice library here. I'm working on a project that needs a differ and a patcher for the browser. Do you have any interest in reviewing a PR that adds UMD support for this library?
Though, to be honest I only skimmed the code briefly. Do you have any sense about whether or not it would work in the browser without too much effort?