@muze-nl/od-jsontag 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/jsontag.mjs +22 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muze-nl/od-jsontag",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "On Demand JSONTag: parse/serialize large datastructures on demand, useful for sharing data between threads",
5
5
  "type": "module",
6
6
  "author": "Auke van Slooten <auke@muze.nl>",
package/src/jsontag.mjs CHANGED
@@ -23,4 +23,25 @@ export function getTypeString(obj) {
23
23
 
24
24
  export function isNull(obj) {
25
25
  return JSONTag.isNull(obj?.[source] ?? obj)
26
- }
26
+ }
27
+
28
+ export function setAttribute(obj, attr, value) {
29
+ return JSONTag.setAttribute(obj?.[source] ?? obj, attr, value)
30
+ }
31
+
32
+ export function setAttributes(obj, attr) {
33
+ return JSONTag.setAttribute(obj?.[source] ?? obj, attr)
34
+ }
35
+
36
+ export function setType(obj, type) {
37
+ return JSONTag.setType(obj?.[source] ?? obj, type)
38
+ }
39
+
40
+ export function addAttribute(obj, attr, value) {
41
+ return JSONTag.addAttribute(obj?.[source] ?? obj, attr, value)
42
+ }
43
+
44
+ export function removeAttribute(obj, attr) {
45
+ return JSONTag.removeAttribute(obj?.[source] ?? obj, attr)
46
+ }
47
+