1.0.1 • Published 8 years ago

commonform-terminal v1.0.1

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
8 years ago
var terminal = require('commonform-terminal')
var decimal = require('decimal-numbering')
var assert = require('assert')

assert.equal(
  terminal(
    {
      content: [
        'This ',
        {use: 'Agreement'},
        ' (this ',
        {definition: 'Agreement'},
        ' is made effective as of the date the last ',
        {use: 'Party'},
        ' signs this ',
        {use: 'Agreement'},
        ' (the ',
        {definition: 'Effective Date'},
        ') by and between ',
        {blank: ''},
        ', a ',
        {blank: ''},
        ' (',
        {definition: 'Company'},
        ') and the several purchasers named in ',
        {reference: 'Purchasers'},
        ' (',
        {definition: 'Purchasers'},
        ', and together with ',
        {use: 'Company'},
        ', each a ',
        {definition: 'Party'},
        ').'
      ]
    },
    [/* no blank values */],
    {numbering: decimal}),
  [
    '    This \u001b[35mAgreement\u001b[39m (this "',
    '\u001b[32mAgreement\u001b[39m" is made effective as of ',
    'the date the last \u001b[35mParty\u001b[39m signs this ',
    '\u001b[35mAgreement\u001b[39m (the "\u001b[32mEffective ',
    'Date\u001b[39m") by and between \u001b[31m\u001b[4m[_]',
    '\u001b[24m\u001b[39m, a \u001b[31m\u001b[4m[_]',
    '\u001b[24m\u001b[39m ("\u001b[32mCompany',
    '\u001b[39m") and the several purchasers named in \u001b[33m',
    'Purchasers\u001b[39m ("\u001b[32mPurchasers\u001b[39m", and ',
    'together with \u001b[35mCompany\u001b[39m, each a "\u001b[32m',
    'Party\u001b[39m").'
  ].join('')
)

assert.equal(
  terminal(
    {content: [{blank: ''}]},
    [
      {
        blank: ['content', 0],
        value: 'NewCo, Inc.'
      }
    ],
    {numbering: decimal}),
  '    \u001b[31m\u001b[4m[NewCo, Inc.]\u001b[24m\u001b[39m'
)
1.0.1

8 years ago

1.0.0

8 years ago

0.9.2

10 years ago

0.9.1

10 years ago

0.9.0

10 years ago

0.8.0

10 years ago

0.7.0

10 years ago

0.6.1

10 years ago

0.6.0

10 years ago

0.5.2

10 years ago

0.5.1

10 years ago

0.5.0

10 years ago

0.4.3

10 years ago

0.4.2

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.3.0

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago