mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-11 14:54:33 +00:00
Rename util.createList to createCollection
Sounds more generic this way.
This commit is contained in:
parent
4ea2e729b4
commit
ad24673776
@ -19,7 +19,7 @@
|
||||
'use strict';
|
||||
|
||||
import { objectTypes } from './constants';
|
||||
import { createList, createMethods } from './util';
|
||||
import { createCollection, createMethods } from './util';
|
||||
|
||||
export class List {
|
||||
constructor() {
|
||||
@ -44,5 +44,5 @@ createMethods(List.prototype, objectTypes.LIST, [
|
||||
], true);
|
||||
|
||||
export function create(realmId, info) {
|
||||
return createList(List.prototype, realmId, info, true);
|
||||
return createCollection(List.prototype, realmId, info, true);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
'use strict';
|
||||
|
||||
import { objectTypes } from './constants';
|
||||
import { createList, createMethods } from './util';
|
||||
import { createCollection, createMethods } from './util';
|
||||
|
||||
export class Results {
|
||||
constructor() {
|
||||
@ -34,5 +34,5 @@ createMethods(Results.prototype, objectTypes.RESULTS, [
|
||||
]);
|
||||
|
||||
export function create(realmId, info) {
|
||||
return createList(Results.prototype, realmId, info);
|
||||
return createCollection(Results.prototype, realmId, info);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ export function fireMutationListeners(realmId) {
|
||||
}
|
||||
}
|
||||
|
||||
export function createList(prototype, realmId, info, mutable) {
|
||||
export function createCollection(prototype, realmId, info, mutable) {
|
||||
let list = Object.create(prototype);
|
||||
let size = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user