Rename util.createList to createCollection

Sounds more generic this way.
This commit is contained in:
Scott Kyle 2016-02-29 12:34:29 -08:00
parent 4ea2e729b4
commit ad24673776
3 changed files with 5 additions and 5 deletions

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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;