yarnspinner2js
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

Yarn Spinner to Javascript Converter

Converts a Yarn Spinner script string to a js object

Installation:

npm i yarnspinner2js

Usage:

import { parseYarnSpinner } from "yarnspinner2js"

const result = parseYarnSpinner(yarnSpinnerString)

Settings:

You can pass the parsing settings with the second parameter like this:

const result = parseYarnSpinner(yarnSpinnerString, {
  ignoreHeaderParameters: ["position"], // default: []
  normalizeText: false, // default: true
})

ignoreHeaderParameters — all header parameters whose names are present in the array will be ignored

normalizeText — if true, all whitespace characters at the beginning and end of strings will be deleted, as well as duplicate spaces inside

Package Sidebar

Install

npm i yarnspinner2js

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

23.7 kB

Total Files

6

Last publish

Collaborators

  • kioley