UNPKG

@natlibfi/marc-record

Version:

MARC record implementation in JavaScript

34 lines (33 loc) 814 B
{ "description": "Should return queried fields and remove them from record", "skip": false, "input": { "leader": "02848ccm a22005894i 4500", "fields": [ {"tag": "001", "value": "bar"}, {"tag": "002", "value": "bar"}, {"tag": "003", "value": "bar"}, {"tag": "004", "value": "bar"}, {"tag": "002", "value": "foo"}, {"tag": "005", "value": "bar"} ] }, "operations": [ { "name": "pop", "args": { "regexp": "002|003" }} ], "returns": [ {"tag": "002", "value": "bar"}, {"tag": "003", "value": "bar"}, {"tag": "002", "value": "foo"} ], "result": { "leader": "02848ccm a22005894i 4500", "fields": [ {"tag": "001", "value": "bar"}, {"tag": "004", "value": "bar"}, {"tag": "005", "value": "bar"} ] } }