deprecatedPublicUtils.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. 'use strict';
  2. var utils = require('./utils');
  3. /**
  4. * @deprecated
  5. * This function will be removed in a future version without replacement.
  6. */
  7. exports.string2binary = function(str) {
  8. return utils.string2binary(str);
  9. };
  10. /**
  11. * @deprecated
  12. * This function will be removed in a future version without replacement.
  13. */
  14. exports.string2Uint8Array = function(str) {
  15. return utils.transformTo("uint8array", str);
  16. };
  17. /**
  18. * @deprecated
  19. * This function will be removed in a future version without replacement.
  20. */
  21. exports.uint8Array2String = function(array) {
  22. return utils.transformTo("string", array);
  23. };
  24. /**
  25. * @deprecated
  26. * This function will be removed in a future version without replacement.
  27. */
  28. exports.string2Blob = function(str) {
  29. var buffer = utils.transformTo("arraybuffer", str);
  30. return utils.arrayBuffer2Blob(buffer);
  31. };
  32. /**
  33. * @deprecated
  34. * This function will be removed in a future version without replacement.
  35. */
  36. exports.arrayBuffer2Blob = function(buffer) {
  37. return utils.arrayBuffer2Blob(buffer);
  38. };
  39. /**
  40. * @deprecated
  41. * This function will be removed in a future version without replacement.
  42. */
  43. exports.transformTo = function(outputType, input) {
  44. return utils.transformTo(outputType, input);
  45. };
  46. /**
  47. * @deprecated
  48. * This function will be removed in a future version without replacement.
  49. */
  50. exports.getTypeOf = function(input) {
  51. return utils.getTypeOf(input);
  52. };
  53. /**
  54. * @deprecated
  55. * This function will be removed in a future version without replacement.
  56. */
  57. exports.checkSupport = function(type) {
  58. return utils.checkSupport(type);
  59. };
  60. /**
  61. * @deprecated
  62. * This value will be removed in a future version without replacement.
  63. */
  64. exports.MAX_VALUE_16BITS = utils.MAX_VALUE_16BITS;
  65. /**
  66. * @deprecated
  67. * This value will be removed in a future version without replacement.
  68. */
  69. exports.MAX_VALUE_32BITS = utils.MAX_VALUE_32BITS;
  70. /**
  71. * @deprecated
  72. * This function will be removed in a future version without replacement.
  73. */
  74. exports.pretty = function(str) {
  75. return utils.pretty(str);
  76. };
  77. /**
  78. * @deprecated
  79. * This function will be removed in a future version without replacement.
  80. */
  81. exports.findCompression = function(compressionMethod) {
  82. return utils.findCompression(compressionMethod);
  83. };
  84. /**
  85. * @deprecated
  86. * This function will be removed in a future version without replacement.
  87. */
  88. exports.isRegExp = function (object) {
  89. return utils.isRegExp(object);
  90. };