Example #1
0
 const isInIndices = (k: number) => {
   if(checkSelf) {
     return indices.find(i => i === k) !== undefined
   } else {
     return false
   }
 }
Example #2
0
function containsStatusInTimeline(is: List<Item>, t: Tweet) {
    'use strict';
    return is.find(i => {
        if (i instanceof Tweet) {
            return i.id === t.id;
        } else {
            return false;
        }
    });
}
Example #3
0
    (state: Conversation, appState: IAppState, key: string, from: string) => {
  const contacts: List<Contact> = appState.contacts.get(key);
  return contacts.find(k => k.get('username') === from);
};
Example #4
0
 static getDimensionByExpression(dimensions: List<Dimension>, expression: Expression): Dimension {
   return dimensions.find(dimension => dimension.expression.equals(expression));
 }
Example #5
0
 static getDimension(dimensions: List<Dimension>, dimensionName: string): Dimension {
   dimensionName = dimensionName.toLowerCase(); // Case insensitive
   return dimensions.find(dimension => dimension.name.toLowerCase() === dimensionName);
 }
Example #6
0
 public findByName(name: string): LinkItem {
   return this.linkItems.find(li => li.name === name);
 }
Example #7
0
 const withRemovals = selStack.filter(a => {
   return removeAnnotations.find(annotation => {
     return annotation.get('id', null) === a.get('id', null)
   }) === undefined
 })
Example #8
0
 getNodeById(id: number) {
     return this.nodes.find(node => node.id === id);
 }