import { customTokenNode } from '@typings/tokenNodeTypes' ; import { ColorRgba } from '@typings/valueTypes' ; import { convertPaintToRgba } from './convertColor' ; /**
 * Return an array of solid stroke colors
 */ const getSolidStrokes = ( paints ) : ColorRgba [ ] => { return [ ... paints ] . map ( paint => convertPaintToRgba ( paint ) ) . filter ( paint => paint != null ) ; } ; param node returns const extractTokenNodeValues = ( node ) : customTokenNode => ( { name : node . name , description : node . description || undefined , bottomLeftRadius : node . bottomLeftRadius , bottomRightRadius : node . bottomRightRadius , topLeftRadius : node . topLeftRadius , topRightRadius : node . topRightRadius , cornerRadius : node . cornerRadius || undefined , cornerSmoothing : node . cornerSmoothing , strokes : getSolidStrokes ( node . strokes ) , strokeWeight : node . strokeWeight , strokeStyleId : node . strokeStyleId , strokeMiterLimit : node . strokeMiterLimit , strokeJoin : node . strokeJoin , strokeCap : node . strokeCap , dashPattern : node . dashPattern , strokeAlign : node . strokeAlign , width : node . width , height : node . height , reactions : node . reactions || undefined , paddingTop : node . paddingTop || 0 , paddingRight : node . paddingRight || 0 , paddingBottom : node . paddingBottom || 0 , paddingLeft : node . paddingLeft || 0 } ) ; export default extractTokenNodeValues ;