UNPKG

@fourlights/mapper

Version:

A simple data mapper written in typescript

1 lines 447 B
{"version":3,"sources":["../src/lib/utils/wrapProperty.ts"],"names":["wrapProperty","property"],"mappings":"AAEO,SAASA,EAAmCC,EAA8C,CAChG,OAAO,OAAOA,GAAa,WAAa,CAAE,MAAOA,CAAS,EAAIA,CAC/D","sourcesContent":["import type { MapperFn, MapperProperty } from '../types'\n\nexport function wrapProperty<T, U extends {} = {}>(property: MapperProperty<T, U> | MapperFn<T>) {\n\treturn typeof property === 'function' ? { value: property } : property\n}\n"]}