UNPKG

kod-temp

Version:

Workano Communications SDK

25 lines (24 loc) 627 B
import newFrom from '../utils/new-from'; export default class CallerID { number; idType; type; static parse(plain) { return new CallerID({ number: plain.number, type: plain.type, }); } static parseMany(plain) { return plain.items.map(item => CallerID.parse(item)); } static newFrom(profile) { return newFrom(profile, CallerID); } constructor({ type, number, }) { this.idType = type; this.number = number; // Useful to compare instead of instanceof with minified code this.type = 'CallerID'; } }