begin.js 910 Bytes
Newer Older
Sven Franck's avatar
Sven Franck committed
1 2 3 4 5 6
/*
* Copyright 2013, Nexedi SA
* Released under the LGPL license.
* http://www.gnu.org/licenses/lgpl.html
*/

7 8 9 10 11
/**
 * Provides some function to use complex queries with item list
 *
 * @module complex_queries
 */
12 13
// define([module_name], [dependencies], module);
(function (module) {
14
  "use strict";
15 16 17 18 19 20 21 22
  if (typeof define === 'function' && define.amd) {
    return define(module);
  }
  window.complex_queries = module();
}(function () {
  "use strict";
  var to_export = {};

23 24
  /**
   * Add a secured (write permission denied) property to an object.
25
   *
26 27 28 29 30 31 32 33 34 35 36 37
   * @param  {Object} object The object to fill
   * @param  {String} key The object key where to store the property
   * @param  {Any} value The value to store
   */
  function _export(key, value) {
    Object.defineProperty(to_export, key, {
      "configurable": false,
      "enumerable": true,
      "writable": false,
      "value": value
    });
  }