1.7.3 • Published 3 years ago

js.system.collections v1.7.3

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

js.system.collections

npm LICENSE

Vanilla JavaScript ES collections inspired by .NET for Node.js and the browser. It has been used in production, but keep in mind that there are no tests.

Getting Started

Install with NPM to use js.system.collections on Node.js

npm i js.system.collections

or

npm install js.system.collections

and use it like:

const { Dictionary, List } = require( 'js.system.collections' );
const myDict = new Dictionary();
const myList = new List();

Use js.system.collections on the browser

<script src="js.system.collections.min.js"></script>

or

<script src="https://cdn.jsdelivr.net/gh/joao-neves95/js.system.collections/dist/js.system.collections.min.js"></script>

or

<script src="https://raw.githubusercontent.com/joao-neves95/js.system.collections/master/dist/js.system.collections.min.js"></script>

 

API

  • Common properties and methods

    • length
    • isEmpty
    • get(index)
    • getAll()
    • clear()
    • removeFirst()
    • removeLast()
  • Dictionary( uniqueKeys = false )

    • lastValue
    • getAllValues
    • add( key, value )
    • remove( key )
    • updateByKey( key, newValue )
    • updateByIndex( idx, newValue )
    • getByIndex( index )
    • getKeyByIndex( index )
    • getByKey( key )
    • findIndexOfKey( key )
    • forEachValue( Callback )
  • List( valueType = 'any' ) <'string' | 'number' | 'int' | 'float' | 'boolean' | 'any'>

    • last
    • add( value )
    • contains( value )
    • update( index, value )
    • remove( index )
    • forEach( Callback )
1.7.3

3 years ago

1.7.2

3 years ago

1.7.1

4 years ago

1.7.0

4 years ago

1.6.0

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago

1.0.0-beta.3

5 years ago

1.0.0-beta.2

5 years ago