Socket
Socket
Sign inDemoInstall

commonform-terminal

Package Overview
Dependencies
36
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    commonform-terminal

display Common Forms at text terminals


Version published
Maintainers
2
Install size
472 kB
Created

Readme

Source
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'
)

Keywords

FAQs

Last updated on 25 Aug 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc