js-yaml.js 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. 'use strict';
  2. var loader = require('./js-yaml/loader');
  3. var dumper = require('./js-yaml/dumper');
  4. function deprecated(name) {
  5. return function () {
  6. throw new Error('Function ' + name + ' is deprecated and cannot be used.');
  7. };
  8. }
  9. module.exports.Type = require('./js-yaml/type');
  10. module.exports.Schema = require('./js-yaml/schema');
  11. module.exports.MINIMAL_SCHEMA = require('./js-yaml/schema/minimal');
  12. module.exports.SAFE_SCHEMA = require('./js-yaml/schema/safe');
  13. module.exports.DEFAULT_SCHEMA = require('./js-yaml/schema/default');
  14. module.exports.load = loader.load;
  15. module.exports.loadAll = loader.loadAll;
  16. module.exports.safeLoad = loader.safeLoad;
  17. module.exports.safeLoadAll = loader.safeLoadAll;
  18. module.exports.dump = dumper.dump;
  19. module.exports.safeDump = dumper.safeDump;
  20. module.exports.YAMLException = require('./js-yaml/exception');
  21. module.exports.scan = deprecated('scan');
  22. module.exports.parse = deprecated('parse');
  23. module.exports.compose = deprecated('compose');
  24. module.exports.addConstructor = deprecated('addConstructor');
  25. require('./js-yaml/require');