realm-js/lib/constants.js
Scott Kyle 0b35564830 Merge pull request #107 from realm/sk-live-update-fixes
Ensure Lists and Results live-update in Chrome
2015-10-28 10:46:43 -07:00

51 lines
751 B
JavaScript

/* Copyright 2015 Realm Inc - All Rights Reserved
* Proprietary and Confidential
*/
'use strict';
let keys = {};
let objectTypes = {};
let propTypes = {};
[
'id',
'realm',
'type',
].forEach(function(name) {
keys[name] = Symbol();
});
[
'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, {
value: 'PropTypes' + type,
enumerable: true,
});
});
module.exports = {
keys,
objectTypes,
propTypes
};