import type { Datatable , ExpressionFunctionDefinition } from 'src/plugins/expressions' ; export interface PluckArguments { key : string ; } export const pluck = { name : 'pluck' , inputTypes : [ 'datatable' ] , help : 'Takes a cell from the first table row.' , args : { key : { aliases : [ '_' ] , types : [ 'string' ] , help : 'The column id.' , required : true , } , } , fn ( { rows } , { key } ) { const [ { [ key ] : value } ] = rows ; return value ; } , } ;