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

24 lines (16 loc) 414 B
import Bunyan from 'bunyan'; const log = Bunyan.createLogger({name: "Stack"}); import { QUEUE, NONE } from '../constants/types'; import Collection from './collection'; class Queue extends Collection { TYPE = QUEUE; _add(value, _value) { value.unshift(_value); return value; } _next(value) { const nextValue = value.pop(); return { nextValue, value }; } } export default Queue;