realm-js/lib/constants.js
Scott Kyle 0eb3b49970 Ensure Lists and Results live-update in Chrome
Results needed to live-update during a transaction (not just as the end), and Lists needed to update on deletions as well.
2015-10-28 10:21:32 -07:00

47 lines
664 B
JavaScript

'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
};