JSPM

list-collection

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

list-collection

Package Exports

  • list-collection
  • list-collection/dist/index.js

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 (list-collection) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

This library helps to keep collection data, update collection.

const items = [
    { id: 1, name: 'test1' },
    { id: 2, name: 'test2' }
]

let collection = Collection.toData(items);


collection = collection.updateOne({id: 2, name: 'Updated name'});
collection = collection.removeOne(2);
collection = collection.append({id: 3, name: 'test3'});

const list = collection.toList();