xor.js 510 B

123456789101112131415161718
  1. /*
  2. * Buffer xor module
  3. * Copyright (c) Agora S.A.
  4. * Licensed under the MIT License.
  5. * Version: 1.0
  6. */
  7. try {
  8. module.exports = require('../build/Release/xor');
  9. } catch (e) { try {
  10. module.exports = require('../build/default/xor');
  11. } catch(e) { try {
  12. module.exports = require('./xor.fallback');
  13. console.warn("Warning: Native modules not compiled. XOR performance will be degraded.")
  14. } catch (e) {
  15. console.error("xor.node seems not to have been built. Run npm install.")
  16. throw e;
  17. }}}