ts utils:Typescript实用程序包 源码
@eunchurn ts-utils 环形缓冲区 用法 import { Ring } from "@eunchurn/ring-ts" ; const ring = new Ring ( 100 ) ; ring . push ( 1 ) ; console . log ( ring . toArray ( ) ) // [1] const { isEmpty , count , isFull , size } = testRing ; console . log ( { isEmpty , count , isFull , size } ) ; // { isEmpty: false, count: 1, isFull: false, size: 100 } ring . dequeue ( ) ; console . log ( ring . toArray ( ) ) // []
下载地址
用户评论