UNPKG

class-o-mat

Version:

ALPHA VERSION ONLY: class-o-mats will help to create getter-setter functionality with validations that can be attached to a container class for easier coding. Some basic validations are included. class-o-mats also has the ability to store params as bloc

10 lines (7 loc) 320 B
import { NONE } from '../constants/types'; const getterSetter = function(ts, key, value=NONE) { if (value === NONE) return ts._params[key]; ts._params[key] = value; return ts; } export default getterSetter;