-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can this be used directly in the browser? #1
Comments
Hi Andy I haven't tested this in the browser yet, but I'm aiming for it to be usable across both browser and headless environments. Once this library has most of the VocaLink exceptions covered, I'll work on adding support for NPM/Bower and in-browser testing. What you can do for now is use Browserify's standalone output. $ npm build
$ browserify build/modcheck.js --standalone Modcheck > build/modcheck_bundle.js <html>
<head>
<script src="build/modcheck_bundle.js"></script>
</head>
<body>
<script>
var modcheck = new Modcheck('66374958', '08-99-99');
if (modcheck.check()) {
console.log('This account number could potentially be registered to this sort code.');
} else {
console.log('This account number could NOT be registered to this sort code.');
}
</script>
</body>
</html> Hope that helps. |
That is awesome! Thank you :) |
Which exceptions are you missing? |
If you can let me know what needs doing, I and a couple of colleagues would be interested in seeing if we can help :) |
Take a look at the attached PDF (Section 5.2) that documents all of VocaLinks "Exceptions". These need to be implemented for 100% compatibility, otherwise checks will fail when they should pass. You'll see I've made a start on a couple of them. Any PRs implementing these exceptions are very welcome! |
Hi,
Can this be used directly in the browser?
I have built and browserified the code which successfully brings in the weightTable etc. Can I use this directly in the browser and ideally without require.js etc?
Many thanks,
Andy
P.S. Awesome library.
The text was updated successfully, but these errors were encountered: