Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

fit-server-utils

Helper functions when working with Sevenval FIT-Server

readme

Build Status

FIT-Server Utils

This package contains useful functions when dealing with the Sevenval FIT-Server.

Usage

npm install --save-dev fit-server-utils

API

interface IFITMark {
  key: string;
  value: string;
}

validateMark(mark: IFITMark): string

Validates a given mark. Returns null if valid and an error message if invalid.

getMarks(input: string): IFITMark[]

Gets all marks from a string.

updateMark(input: string, mark: IFITMark): string

Update or add a mark to a given string.

removeMark(input: string, markKey: string): string

Remove a mark from a string.

License

MIT, see LICENSE file

changelog

Changelog

1.1.1 - Bug Fix (22.09.2016)

  • Fix missing typings for removeMarks

1.1.0 - removeMarks (22.09.2016)

Features:

  • removeMark function

1.0.0 - Initial Release (22.09.2016)

Features:

  • update/add marks
  • validate marks
  • get all marks from a string