2015-10-28 17:37:17 +00:00
|
|
|
/* Copyright 2015 Realm Inc - All Rights Reserved
|
|
|
|
* Proprietary and Confidential
|
|
|
|
*/
|
|
|
|
|
2015-10-19 23:19:43 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
let keys = {};
|
|
|
|
let objectTypes = {};
|
|
|
|
let propTypes = {};
|
|
|
|
|
|
|
|
[
|
|
|
|
'id',
|
|
|
|
'realm',
|
|
|
|
'type',
|
|
|
|
].forEach(function(name) {
|
|
|
|
keys[name] = Symbol();
|
|
|
|
});
|
|
|
|
|
|
|
|
[
|
2015-11-03 00:36:24 +00:00
|
|
|
'DICT',
|
2015-10-19 23:19:43 +00:00
|
|
|
'FUNCTION',
|
|
|
|
'REALM',
|
|
|
|
'RESULTS',
|
|
|
|
].forEach(function(type) {
|
|
|
|
Object.defineProperty(objectTypes, type, {
|
|
|
|
value: 'ObjectTypes' + type,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
[
|
|
|
|
'BOOL',
|
|
|
|
'INT',
|
|
|
|
'FLOAT',
|
|
|
|
'DOUBLE',
|
|
|
|
'STRING',
|
|
|
|
'DATE',
|
|
|
|
'DATA',
|
|
|
|
'OBJECT',
|
|
|
|
'LIST',
|
|
|
|
].forEach(function(type) {
|
|
|
|
Object.defineProperty(propTypes, type, {
|
2015-11-19 01:55:30 +00:00
|
|
|
value: type.toLowerCase(),
|
2015-10-19 23:19:43 +00:00
|
|
|
enumerable: true,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
keys,
|
|
|
|
objectTypes,
|
|
|
|
propTypes
|
|
|
|
};
|