1.1.1 • Published 10 years ago

qsl v1.1.1

Weekly downloads
1
License
Apache 2.0
Repository
github
Last release
10 years ago

qsl.js

Build Status

QSL parser

QSL is an indentation-significant, outliner-like markup language used to define questionnaires.

This project is a JavaScript implementation of a QSL parser.

Usage

qsl.js exposes parse the takes a raw QSL document and returns a array-object representation.

format takes a parsed document and a section name and returns a formatted representation of the given section.

# bands.qsl
Favourite bands survey
defaults
  required
section execution order
  bands
bands:
  First gig?
  How many gigs?
    integer
'use strict';

var qsl = require('qsl');
var parsed = qsl.parse(bandsQSL);
return qsl.format(parsed, 'bands');
// =>
// [
//   {
//     label: 'First gig?',
//     name: 'first-gig',
//     type: 'text',
//     required: true
//   },
//   {
//     label: 'How many gigs?',
//     name: 'how-many-gigs',
//     type: 'number',
//     required: true
//   }
// ];

Contributors

License

Released under Apache 2.0 license.

1.1.1

10 years ago

1.1.0

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

0.0.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago