Skip to content

About

replace terms and headings in Common Forms

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

import * as rename from 'commonform-rename'
import assert from 'node:assert'

const first = {
  content: [
    {definition: 'Company'}, ' means ', {blank: ''}, ' plus',
    {form: {content: ['shareholders of ', {use: 'Company'}]}},
    {form: {content: ['subsidiaries of ', {use: 'Company'}]}}
  ]
}

rename.term('Company', 'Enterprise', first)

assert.deepEqual(first, {
  content: [
    {definition: 'Enterprise'}, ' means ', {blank: ''}, ' plus',
    {form: {content: ['shareholders of ', {use: 'Enterprise'}]}},
    {form: {content: ['subsidiaries of ', {use: 'Enterprise'}]}}
  ]
})

const second = {
  content: [
    {heading: 'Recitals', form: {content: ['...']}},
    {reference: 'Recitals'}
  ]
}

rename.heading('Recitals', 'Background', second)

assert.deepEqual(second, {
  content: [
    {heading: 'Background', form: {content: ['...']}},
    {reference: 'Background'}
  ]
})

About

replace terms and headings in Common Forms

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages