@cycle-robot-drivers/action
Advanced tools
Comparing version 0.0.16 to 0.0.17
@@ -21,3 +21,3 @@ "use strict"; | ||
function initGoal(goal, isGoal) { | ||
if (isGoal === void 0) { isGoal = function (g) { return !!g.goal_id; }; } | ||
if (isGoal === void 0) { isGoal = function (g) { return !!g && !!g.goal_id; }; } | ||
return isGoal(goal) ? goal : { | ||
@@ -24,0 +24,0 @@ goal_id: generateGoalID(), |
@@ -18,3 +18,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
export function initGoal(goal, isGoal) { | ||
if (isGoal === void 0) { isGoal = function (g) { return !!g.goal_id; }; } | ||
if (isGoal === void 0) { isGoal = function (g) { return !!g && !!g.goal_id; }; } | ||
return isGoal(goal) ? goal : { | ||
@@ -21,0 +21,0 @@ goal_id: generateGoalID(), |
{ | ||
"name": "@cycle-robot-drivers/action", | ||
"version": "0.0.16", | ||
"description": "", | ||
"version": "0.0.17", | ||
"description": "Utilities for cycle-robot-drivers packages", | ||
"author": "Michael Jae-Yoon Chung", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -13,3 +13,3 @@ import {GoalID, Goal, Result} from './types' | ||
goal: any, | ||
isGoal: (g: any) => boolean = g => !!g.goal_id, | ||
isGoal: (g: any) => boolean = g => !!g && !!g.goal_id, | ||
): Goal { | ||
@@ -16,0 +16,0 @@ return isGoal(goal) ? goal : { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
16308