JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q36305F
  • License MIT

this module is for use ArrayList in javascript/typescript like java dev..

Package Exports

  • arraylist-tn

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (arraylist-tn) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ARRAYLIST-TN


Build Status

you can now use the arraylist in you typescript and javascript code easily ..

NOTE: you can send to me for add anything you want in instgram ..

Installation


  • NPM :
$ npm install arraylist-tn
  • YARN :
$ yarn add arraylist-tn

Usage


You can use this module like ArrayList in the JAVA .. you don't need to change any thing ..

all-methods-for-now-v1

Example


This is a basic example :

//
// ==> version : 1.0.0 ;
// const { ArrayList } = require ('arraylist-tn'); 
//
// ==> current version : 1.1.0 ; now we support import default.
//
const ArrayList = require ('arraylist-tn');  // || const { ArrayList } = require ('arraylist-tn'); 

const myList = new ArrayList();
myList.add('imed jaberi');
console.log(myList.getAll()); // [ 'imed jaberi' ]
myList.addAll(['nodejs','js-lover','tunisia','red','CA']); 
console.log(myList.getAll()); // [ 'imed jaberi', 'nodejs', 'js-lover', 'tunisia', 'red', 'CA' ]
myList.remove(4);
console.log(myList.getAll()); // [ 'imed jaberi', 'nodejs', 'js-lover', 'tunisia', 'CA' ]
console.log(myList.size()); // 5
console.log(myList.contains('CA')); // true
console.log(myList.isEmpty()); // false 
myList.removeAll(); 
myList.addAll([100,50,-50,0,-100]);
myList.sort(); // you can add "asc" as params 
console.log(myList.getAll()); // [ -100, -50, 0, 50, 100 ]
myList.sort("desc");
console.log(myList.getAll()); // [ 100, 50, 0, -50, -100 ]

License


MIT