@paulio/dirty-map-js
v0.1.0
Published
Decorates JavaScript map to track changed entries.
Readme
P103: Dirty Map
DirtyMap keeps a set of all keys for entries that are dirty, i.e. those that have been added, changed, deleted, or flagged by the user. It does not record what changes were made.
Implementation wise, it decorates the builtin JavaScript Map.
API Documentation is in /src.
Usage 1: Import from NPM
package.json
{
"dependencies": {
"@paulio/dirty-map-js": "0.1.0"
}
}my-script.js
import DirtyMap from '@paulio/dirty-map-js'
// ...Usage 2: Copy & Paste
Copy & paste files from /src into your project. Tests are written in Jest but should be easy to adapt or rewrite for whatever testing framework.
