Skip to content

A tiny implementation of SourceMapGenerator usable in ES Module, CommonJS, and Browser friendly formats

License

Notifications You must be signed in to change notification settings

shanewholloway/js-tiny-source-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tiny-source-map

A tiny implementation of SourceMapGenerator usable in ES Module, CommonJS, and Browser friendly formats

Inspired and extracted from require('source-map/lib/source-map-generator.js') of Mozilla's wonderful source-map library under BSD-3 license.

API

import tiny_source_map_generator from 'tiny-source-map'

// ...

const src_map = tiny_source_map_generator()

src_map.addMapping({
  generated:{line, column},
  original:{line, column},
  source,
  name,
})

src_map.setSourceContent(source, content)

src_map.toJSON()

src_map.toString()

License

BSD-3 Clause

About

A tiny implementation of SourceMapGenerator usable in ES Module, CommonJS, and Browser friendly formats

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published