diff --git a/cortex.json b/cortex.json new file mode 100644 index 0000000..a2600ab --- /dev/null +++ b/cortex.json @@ -0,0 +1,40 @@ +{ + "name": "blueimp-md5", + "version": "1.1.0", + "title": "JavaScript MD5", + "description": "JavaScript MD5 implementation.", + "keywords": [ + "javascript", + "md5" + ], + "homepage": "https://github.com/blueimp/JavaScript-MD5", + "author": { + "name": "Sebastian Tschan", + "url": "https://blueimp.net" + }, + "maintainers": [ + { + "name": "Sebastian Tschan", + "url": "https://blueimp.net" + } + ], + "contributors": [ + { + "name": "Paul Johnston", + "url": "http://pajhome.org.uk/crypt/md5" + } + ], + "repository": { + "type": "git", + "url": "git://github.com/blueimp/JavaScript-MD5.git" + }, + "bugs": "https://github.com/blueimp/JavaScript-MD5/issues", + "licenses": [ + { + "type": "MIT", + "url": "http://www.opensource.org/licenses/MIT" + } + ], + + "main": "js/md5.js" +} diff --git a/js/md5.js b/js/md5.js index f92ba37..c05b970 100644 --- a/js/md5.js +++ b/js/md5.js @@ -264,7 +264,10 @@ return raw_hmac_md5(key, string); } - if (typeof define === 'function' && define.amd) { + if (typeof module != 'undefined' && module.exports){ + module.exports = md5; + } + else if (typeof define === 'function' && define.amd) { define(function () { return md5; });