Skip to content

dxfom/text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DXF Object Model / TEXT

A low level DXF TEXT content parser.

Installation

$ npm i @dxfom/text

Usage

import { parseDxfTextContent } from '@dxfom/text'

const content = parseDxfTextContent(
  String.raw`%%uunderline%%obothline%%uoverline%%onoline%%kstrike%%k%%c10%%p0.01%%%%%d%%975\U+d83d\U+de04`
)
console.log(content)

outputs:

[
  { text: 'underline', u: 1 },
  { text: 'bothline', u: 1, o: 1 },
  { text: 'overline', o: 1 },
  { text: 'noline' },
  { text: 'strike', k: 1 },
  { text: '⌀10±0.01%°Ϗ😄' }
]

License

GPL 3.0