Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 961 Bytes

README.md

File metadata and controls

49 lines (34 loc) · 961 Bytes

Status: pre-alpha

A library for generating or using coord-to-coord mapping files.

Installing / Developing

cd node-ccmf; npm link

Creating CCMF files

CCMF = require('CCMF');

CCMF.write_ccmf(stream, info, linemaps, fileinfos, mappings)
CCMF.ccmf_string(stream, info, linemaps, fileinfos, mappings)

CCMFH-style file info lines will be created iff any fileinfo in fileinfos has any properties.

([{...}]\n instead of []\n)

Using CCMF files

ccmf = CCMF.fromStream(x, callback)
ccmf = CCMF.from{String,Buffer}(x)

ccmf.lookup(line, col)
    Result:
        null or
        {
            # You'll get as many of these fields and subfields as possible.
            line: 
            col: 
            label: 
            file: {
                sha1: 
                name: 
                path: 
                url: 
            }
        }