Test Coverage



koconut

Change-Log

Release v1.0.166

04 Jul 2022

Bug Fixes and Other Changes

  • All the package-deps updated

Release v1.0.165

22 Dec 2021

Bug Fixes and Other Changes

  • You can use koconut in browser env with bower
    • To install, type
        bower install git@github.com:ApexCaptain/Koconut.git
      
    • Then, add src script to .html file
      <!DOCTYPE html>
      <html>
      <head>
      <meta charset="UTF-8" />
      <title>Your page title</title>
      <script src="bower_components/koconut/webpack/koconut.js"></script>
      </head>
      <body>
      ...
      </body>
      <script>
      KoconutArray.of(1, 2, 3, 4, 5)
      .onEach(alert)
      .process()
      .then(() => alert('Nailed it!'));
      </script>
      </html>

Repository





Release v1.0.163

13 Dec 2021

Buf Fixes and Other Changes

  • Fix misspelled words in descriptive comments.

Known Caveats





Release v1.0.162

8 Dec 2021

Bug Fixes and Other Changes

  • Fix some methods that did not print out intelliSence description of method example source.

Known Caveats

Repository





Release v1.0.15

1 Oct 2020

Major Features and Improvements

  • New base container class KoconutBoolean is added. It is a child class that extends KoconutPrimitive<boolean> and also implements Boolean of typescript. All the methods of other classes that return KoconutPrimitive<boolean> are replcaed with it. Documentization is still being processed. Supported methods are as following.

    • compareTo
    • not
    • and
    • nand
    • or
    • nor
    • xor
    • xnor
    • eqv
  • New processor method retrieve is added to container classes. It simply processes all the chained objects and returns container instance itself. Please, have a check following example.

    const koconutBoolean = await new KoconutBoolean(true).retrieve();
    console.log(koconutBoolean);
    // ↑ KoconutBoolean { isValidated: true, data: true }
  • Return type of equalsTo of protocol KoconutEquatable is now also can be KoconutPrimitive<boolean> or KoconutBoolean.

Known Caveats

  • Following methods are deprecated.

    - `toArray` -- Commonly // `asArray` instead.
    - `toSet` -- Commonly // `asSet` instead.
    - `forEachIndexed` -- in `KoconutMap`
    - `onEachIndexed` -- in `KoconutMap`




Release v1.0.14

21 Sep 2020

Major Features and Improvements

  • New static creator method generate is added to container classes. It creates a new container instance with given count as number of elements and the values are provided by following generator function block with given ordered index as an argument . Please, have a check following example.

    const evenNumberArray = await KoconutArray.generate(5, (i) => i * 2).yield();
    console.log(evenNumberArray);
    // ↑ [ 0, 2, 4, 6, 8 ]

    const evenNumberSet = await KoconutSet.generate(5, (i) => i * 2).yield();
    console.log(evenNumberSet);
    // ↑ Set { 0, 2, 4, 6, 8 }

    const numberKeyStringValueMap = await KoconutMap.generate(
    5,
    (i) => [i, i.toString()],
    // ↑ Also can be
    // new Pair(i, i.toString())
    // Pair.from([i, i.toString()])
    // new KoconutPair(i, i.toString())
    // new Entry(i, i.toString())
    // Entry.from([i, i.toString()])
    // new KoconutEntry(i, i.toString())
    ).yield();
    console.log(numberKeyStringValueMap);
    // ↑ Map { 0 => '0', 1 => '1', 2 => '2', 3 => '3', 4 => '4' }

Bug Fixes and Other Changes

  • Mapping and filtering methods of collections with specified target destination is now propery applied to Set when the value is instance of your custom class that inherits KoconutEquatable. Applied Methods - flatMapTo - mapTo - mapNotNullTo - flatMapIndexedTo - mapIndexedTo - mapIndexedNotNullTo - filterTo - filterNotTo - filterIndexedTo - filterNotNullTo




Release v1.0.13

18 Sep 2020

Currently Working on...

  • I'm planning to design 2 new data container classes for sequential and parallel promise chain. Those are quite similar to Sequence or Stream in Java and Kotlin.

Known Caveats

  • indexed methods of KoconutMap are deprecated. It is not appropriate to let it be possible to use in Map data structure. They'll remain until version 1.0.15.
  • Common caster methods toArray and toSet are deprecated. Instead, you can use asArray or asSet. Those have the same functionality. They'll remain until version 1.0.15.

Repository

  • API documentation of KoconutMap is completed.




Release v1.0.12

14 Sep 2020

Bug Fixes and Other Changes

  • Babel@runtime is now moved to common dependencies section. I'm sorry I didn't catch that.




Release v1.0.11

12 Sep 2020

Bug Fixes and Other Changes

  • Creation of container classes allows null as its argument and also use it as default value. When it is omitted, it'll return an empty collection instance.

    new KoconutArray();
    KoconutArray.of();
    KoconutArray.from(); // An empty array.

    new KoconutSet();
    KoconutSet.of();
    KoconutSet.from(); // An empty set.

    new KoconutMap();
    KcoonutMap.of();
    KoconutMap.from(); // An empty map.

    If you're using TypeScript, it is recommended to declare generic type explicitly.

Repository

  • README for NPM is now separated. Not very different from the original README.md. Since the column on NPM README is quite narrow and table of contents navigation does not work properly. I think it's because anchor links are generated differently on GitHub and NPM. I'll only leave brief introductions and examples in the NPM README.




Release v1.0.10

10 Sep 2020

Major Features and Improvements

  • Iterative functions, such as forEach, forEachIndexed, onEach and onEachIndexed now can be interrupted with KoconutLoopSignal.BREAK. Of course it is still available by simple boolean. To stop the iteration in the mean time, you can simply return false or return KoconutLoopSignal.BREAK. You can check example if you want to.

Known Caveats

Repository

  • README.md and CHANGELOG.md files added.
  • All the classes, methods, protocols or etc are currently being documentized and available from now on. There are still lots of work to do though... You can check'em here.

Generated using TypeDoc