0.2.0 • Published 4 years ago

generic-collections-js v0.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

generic-collections-js

Build Status npm Total alerts Language grade: JavaScript

This library includes generic layer for javascript collections. Currently supported generic types are depicted below:

  • ArrayT - Generic version of Array type

Installing

npm install --save generic-collections-js

Testing

npm run test

Usage

const { ArrayT } = require('generic-collections-js')

// Primitive type example //
const numArray = new ArrayT('number')
numArray.push(2, 3)

try {
  numArray.push('4')
} catch (err) {
  console.log(err.toString()) // Error: ERR_INVALID_VALUE_TYPE
}

console.log(numArray.toArray()) // [ 2, 3 ]

Authors

  • vigan-abd (vigan.abd@gmail.com)
0.2.0

4 years ago

0.1.0

4 years ago

0.0.9

4 years ago

0.0.5

4 years ago

0.0.4-b

4 years ago

0.0.4-a

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2-b

4 years ago

0.0.2-a

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago