index.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Utilities: A classic collection of JavaScript utilities
  3. * Copyright 2112 Matthew Eernisse ([email protected])
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. *
  17. */
  18. var utils = {}
  19. // Core methods
  20. , core = require('./core')
  21. // Namespaces with methods
  22. , string = require('./string')
  23. , file = require('./file')
  24. , async = require('./async')
  25. , i18n = require('./i18n')
  26. , uri = require('./uri')
  27. , array = require('./array')
  28. , object = require('./object')
  29. , date = require('./date')
  30. , request = require('./request')
  31. , log = require('./log')
  32. , network = require('./network')
  33. // Third-party -- remove this if possible
  34. , inflection = require('./inflection')
  35. // Constructors
  36. , EventBuffer = require('./event_buffer').EventBuffer
  37. , XML = require('./xml').XML
  38. , SortedCollection = require('./sorted_collection').SortedCollection;
  39. core.mixin(utils, core);
  40. utils.string = string;
  41. utils.file = file;
  42. utils.async = async;
  43. utils.i18n = i18n;
  44. utils.uri = uri;
  45. utils.array = array;
  46. utils.object = object;
  47. utils.date = date;
  48. utils.request = request;
  49. utils.log = log;
  50. utils.network = network;
  51. utils.inflection = inflection;
  52. utils.SortedCollection = SortedCollection;
  53. utils.EventBuffer = EventBuffer;
  54. utils.XML = XML;
  55. module.exports = utils;