repo.or.cz
/
gitter.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Gitter migration: Setup redirects (rollout pt. 3)
[gitter.git]
/
shared
/
array-adapter.js
blob
28a1383322102cbc7cdfaf61856227041e9d94c6
1
'use strict'
;
2
3
var
_
=
require
(
'lodash'
);
4
5
module
.
exports
= {
6
get
:
function
(
model
,
key
) {
7
return
model
[
key
];
8
},
9
10
at
:
function
(
collection
,
index
) {
11
return
collection
[
index
];
12
},
13
14
indexOf
:
function
(
collection
,
model
) {
15
return
_
.
indexOf
(
collection
,
model
);
16
}
17
};