open-index/open-npm huggingface dataset:
npm package: @natlibfi/loglevel-message-prefix
Description: Plugin for loglevel which allows defining prefixes for log messages
Author: The National Library of Finland
Latest version: 3.0.1

# loglevel Message prefix plugin [![NPM Version](https://img.shields.io/npm/v/@natlibfi/loglevel-message-prefix.svg)](https://npmjs.org/package/loglevel-message-prefix) [![Build Status](https://travis-ci.org/NatLibFi/loglevel-message-prefix.svg)](https://travis-ci.org/NatLibFi/loglevel-message-prefix) [![Test Coverage](https://codeclimate.com/github/NatLibFi/loglevel-message-prefix/badges/coverage.svg)](https://codeclimate.com/github/NatLibFi/loglevel-message-prefix/coverage)

Plugin for [loglevel](https://github.com/pimterry/loglevel) which allows defining prefixes for log messages

## Usage

### Installation

Clone the sources and install the package (In the source directory) on command line using `npm`:

```sh
npm install
```

## Testing

Run the following NPM script to lint, test and check coverage of the code:

```javascript

npm run check

```

#### AMD

```javascript

define(['loglevel', 'loglevel-message-prefix'], function(log, loglevelMessagePrefix) {

  loglevelMessagePrefix(log, {
    staticPrefixes: ['foobar']
  });

  log.warn('TEST');

});

```

#### Node.js require

```javascript

var log = require('loglevel');
var loglevelMessagePrefix = require('loglevel-message-prefix');

loglevelMessagePrefix(log, {
  staticPrefixes: ['foobar']
});

log.warn('TEST');

```

### Example

**Code**:

```javascript

var log = require('loglevel-message-prefix')(require('loglevel'), {
    prefixes: ['level'],
    staticPrefixes: ['foo', 'bar'],
    separator: '/'
});

log.setLevel('info');

log.info('Testing');

```

**Output**:

```
[INFO/foo/bar]: Testing

```

## Configuration

The configuration object is passed as the second argument to the function. Following properties are supported ():

- **prefixes**: An array of predefined dynamic prefixes that are to be used. Defaults to: `['timestamp', 'level']`. Available prefixes are:
  - *timestamp*: Add locale-specific timestamp
  - *level*: Add log level prefix
- **staticPrefixes**: An array of strings that should be added after dynamic prefixes (E.g. 'foo'). Defaults to none.
- **prefixFormat**: A string template to format the prefix (``%p`` is replaced with the prefix). Defaults to `[%p]:
`
- **separator**: String used to separate prefixes. Defaults to single whitespace (` `).
- **options**: Options for dynamic prefixes. Available options are:
  - *timestamp*: An object of properties for date formatting. Available properties are: *locale*, *timezone* and *hour12*. Defaults to `{hour12: false}`

The properties are defined the [schema file](https://github.com/NatLibFi/loglevel-message-prefix/blob/master/resources/parameters-schema.json).

## License and copyright

Copyright (c) 2015-2017 **University Of Helsinki (The National Library Of Finland)**

This project's source code is licensed under the terms of **MIT License**.
npm package: @natlibfi/loglevel-std-streams
Description: Plugin for loglevel which sends all messages to stderr on Node.js
Author: The National Library of Finland
Latest version: 2.0.2

# loglevel Standard Streams plugin [![NPM Version](https://img.shields.io/npm/v/@natlibfi/loglevel-std-streams.svg)](https://npmjs.org/package/loglevel-std-streams) [![Build Status](https://travis-ci.org/NatLibFi/loglevel-std-streams.svg)](https://travis-ci.org/NatLibFi/loglevel-std-streams) [![Test Coverage](https://codeclimate.com/github/NatLibFi/loglevel-std-streams/badges/coverage.svg)](https://codeclimate.com/github/NatLibFi/loglevel-std-streams/coverage)

Plugin for [loglevel](https://github.com/pimterry/loglevel) which sends all messages to stderr on Node.js

## Usage

### Installation

Clone the sources and install the package (In the source directory) on command line using `npm`:

```sh
npm install
```

## Testing

Run the following NPM script to lint, test and check coverage of the code:

```javascript

npm run check

```

#### AMD

```javascript

define(['loglevel', 'loglevel-std-streams'], function(log, loglevelStdStreams) {

  loglevelStdStreams(log);

  log.warn('TEST');

});

```

#### Node.js require

```javascript

var log = require('loglevel');
var loglevelStdStreams = require('loglevel-std-streams');

loglevelStdStreams(log);

log.warn('TEST');

```

### Example

```sh
$ node -e 'var log = require("loglevel-std-streams")(require("loglevel"));log.warn("This is a warning");console.log("TEST");' 2>log.txt
TEST
$ cat log.txt
This is a warning
$ 
```

## License and copyright

Copyright (c) 2015-2017 **University Of Helsinki (The National Library Of Finland)**

This project's source code is licensed under the terms of **MIT License**.
npm package: @natlibfi/marc-record-serializers
Description: Convert records to and from different MARC formats
Latest version: 11.0.2

# Convert records to and from different MARC formats 
[![NPM Version](https://img.shields.io/npm/v/@natlibfi/marc-record-serializers.svg)](https://npmjs.org/package/@natlibfi/marc-record-serializers)
[![Node Version](https://img.shields.io/node/v/@natlibfi/marc-record-serializers.svg)]()
[![Build Status](https://travis-ci.org/NatLibFi/marc-record-serializers.svg)](https://travis-ci.org/NatLibFi/marc-record-serializers)
[![Test Coverage](https://codeclimate.com/github/NatLibFi/marc-record-serializers/badges/coverage.svg)](https://codeclimate.com/github/NatLibFi/marc-record-serializers/coverage)

### NOTE: UPGRADING FROM VERSION 7 -> 8
All readers are now functions instead of classes.

Replace
```js
const reader = new MARCXML.Reader(fs.createReadStream('marc.xml'));
```
with

```js
const reader = MARCXML.reader(fs.createReadStream('marc.xml'));
```

when using readers.

### NOTE: UPGRADING FROM VERSION 6 -> 7
`MARCXML.to` is now asynchronous.

### NOTE: UPGRADING FROM VERSION 5 -> 6
`MARCXML.from` is now asynchronous because the underlying XML module uses callbacks for errors.

---

Convert records to and from different MARC formats. Deserializes MARC to [@natlibfi/marc-record](https://github.com/natlibfi/marc-record-js).

This a fork of the original [marc-record-serializers](https://github.com/petuomin/marc-record-serializers). The new implementation uses ES6 syntax.

## Usage
### Module
```js
import fs from 'fs';
import {MARCXML} from '@natlibfi/marc-record-serializers';
const reader = MARCXML.reader(fs.createReadStream('marc.xml'));

reader.on('data', record => console.log(record));
```
### Serializers
#### MARCXML
- **reader**: The third argument is a XML namespace prefix used in marcxml (fe. 'marc'). Defaults to no prefix.
- **from**: The second argument is a validation options object (See [@natlibfi/marc-record](https://www.npmjs.com/package/@natlibfi/marc-record))
- **to**: An object can be passed in as the second argument. It supports the following properties:
  - **omitDeclaration**: Whether to omit XML declaration. Defaults to *false*.
  - **indent**: Whether to indent te XML. Defaults to *false*.

### Aleph Sequential
- **to**: If second argument useCrForContinuingResources is true, uses 'CR' in FMT field for continuing resources, otherwise uses Aleph standard 'SE'. Defaults to *false*.

### CLI
```sh
npx @natlibfi/marc-record-serializers
```

## License and copyright

Copyright (c) 2014-2017 **Pasi Tuominen <pasi.tuominen@gmail.com>**

Copyright (c) 2018-2026 **University Of Helsinki (The National Library Of Finland)**

This project's source code is licensed under the terms of **MIT License** or any later version.
npm package: @natlibfi/marc-record-validate
Description: Validate and fix MARC records
Author: The National Library of Finland
Latest version: 9.0.0

# Validate and fix MARC records [![NPM Version](https://img.shields.io/npm/v/@natlibfi/marc-record-validate.svg)](https://npmjs.org/package/@natlibfi/marc-record-validate) [![Test Coverage](https://codeclimate.com/github/NatLibFi/marc-record-validate/badges/coverage.svg)](https://codeclimate.com/github/NatLibFi/marc-record-validate/coverage)

Javascript module to validate and fix MARC records.

## Usage
```js
import {DoubleCommas} from '@natlibfi/marc-record-validators-melinda';
import validateFactory from '@natlibfi/marc-record-validate';

async function run() {
  const validate = validateFactory([await DoubleCommas()]);
  const result = await validate(marcRecord);
}
```
## Configuration
The module returns a factory function that takes an array of validators as an argument. The factory creates a validate function that takes a [MARC record](https://www.npmjs.com/package/@natlibfi/marc-record) instance and optional options as an object:
- **fix**: Whether to run fix-method of the validator or not. Defaults to *false*
- **failOnError**: Do not running remaining validators if the record does not validate (And cannot be fixed if **fix** is set to *true*). Defaults to *false*
- **validateFixes**: Re-run validators after all validators have been processed. Only the validate-method will be called so that fixes are not applied twice. Defaults to *false*
## Validators
See [marc-record-validators-melinda](https://github.com/NatLibFi/marc-record-validators-melinda/wiki) for reference on how to write validators.
## License and copyright

Copyright (c) 2014-2019, 2022-2025 **University Of Helsinki (The National Library Of Finland)**

This project's source code is licensed under the terms of **MIT** or any later version.
npm package: @natlibfi/marc-record-validators-melinda
Description: MARC record validators used in Melinda
Author: The National Library of Finland
Latest version: 12.0.15

# MARC record validators used in Melinda [![NPM Version](https://img.shields.io/npm/v/@natlibfi/marc-record-validators-melinda.svg)](https://npmjs.org/package/@natlibfi/marc-record-validators-melinda)
MARC record validators used in Melinda. See [wiki](https://github.com/NatLibFi/marc-record-validators-melinda/wiki) for documentation.

## License and copyright

Copyright (c) 2014-2026 **University Of Helsinki (The National Library Of Finland)**

This project's source code is licensed under the terms of **MIT** or any later version.
npm package: @natlibfi/melinda-backend-commons
Description: Shared modules for Melinda's backend applications
Author: The National Library of Finland
Latest version: 3.0.5

# Shared modules for Melinda's backend applications [![NPM Version](https://img.shields.io/npm/v/@natlibfi/melinda-backend-commons.svg)](https://npmjs.org/package/@natlibfi/melinda-backend-commons)

## Mailer cli
### Envs:
* Required
  * MELINDA_MAILER_SMTP_CONFIG: contains stringified smtp config
    * e.g. '{"host":"smtp.url.com","port":587,"secure": false,"auth":{"user":"","pass":""}}'
* Optional
  * MELINDA_MAILER_EMAIL_FROM: Email from
  * MELINDA_MAILER_EMAIL_TO: Email to
  * MELINDA_MAILER_SUBJECT: Email subject
  * MELINDA_MAILER_TEMPLATE: Email template name
  * MELINDA_MAILER_TEMPLATE_TEST: true/false

## License and copyright

Copyright (c) 2018-2026 **University Of Helsinki (The National Library Of Finland)**

This project's source code is licensed under the terms of **MIT** or any later version.
npm package: @natlibfi/melinda-marc-record-merge-reducers
Description: Generic MARC record merge reducers for use with marc-record-merge
Author: The National Library of Finland
Latest version: 3.1.5

# Generic MARC record merge reducers for use with marc-record-merge [![NPM Version](https://img.shields.io/npm/v/@natlibfi/melinda-marc-record-merge-reducers.svg)](https://npmjs.org/package/@natlibfi/melinda-marc-record-merge-reducers)

## License and copyright

Copyright (c) 2020-2026 **University Of Helsinki (The National Library Of Finland)**

This project's source code is licensed under the terms of **MIT** or any later version.