Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
@oada/list-lib
Advanced tools
A library for handling lists of items in OADA for TypeScript and JavaScript. The library takes callbacks for events like new items, removed items, and changed items. It tried to abstract away as much of the complexity as is reasonable, and tracks which items in the list are new, old, etc.
For detailed options, see the Options
type in src/Options.ts
import { ListWatch } from '@oada/list-lib'
// See type definitions for all supported options
const watch = new ListWatch({
path: '/bookmarks/foo/list',
name: 'bob',
conn: /* an @oada/client instance */,
resume: true,
onAddItem(item, id) { console.log(`New list item ${id}: %O`, item) },
onRemoveItem(id) { console.log(`Item ${id} removed`) },
})
// The watch can be stopped after creation
await watch.stop()
While the ListWatch
class is generic,
you will typically not want to specify a type parameter in your code.
If you supply an assertItem
function,
the type of Item
will be inferred from it.
This will help minimize runtime errors
(assuming your type assertion is good),
and in the case of no assertion the library defaults Item
to unknown
.
In more advanced use-cases, you might want to prompt the library to re-check
all the items in the list.
For this reason, ListWatch
has a forceRecheck
method.
Calling this will cause the library to check all the current list items.
FAQs
Library for processing items in an OADA list
The npm package @oada/list-lib receives a total of 39 weekly downloads. As such, @oada/list-lib popularity was classified as not popular.
We found that @oada/list-lib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.