UNPKG

igogo

Version:

Fast Either and Maybe from Fantasy Land with Flow and TypeScript support

10 lines (8 loc) 223 B
/* @flow */ export const getSet = (keyName?: string) => { const key = Symbol(keyName); return [ (instance: Object): any => instance[key], (instance: Object, value: any): any => (instance[key] = value), ]; };