// Node.js var sourceMap = require( 'source-map '); // Browser builds var sourceMap = window. SourceMap; // Inside Firefox const sourceMap = require( 'devtools/toolkit/sourcemap/source-map.js '); SourceMapConsumer A SourceMapConsumer instance represents a parsed source map which we can query for information about the original file positions by giving it a file position in the generated source. New SourceMapConsumer(rawSourceMap) The only parameter is the raw source map (either as a string which can be JSON.parse'd, or an object). According to the spec, source maps have the following attributes: • version: Which version of the source map spec this map is following. • sources: An array of URLs to the original source files.
Gmaps.js allows you to use the potential of Google Maps in a simple way. No more extensive documentation or large amount of code.
• names: An array of identifiers which can be referenced by individual mappings. • sourceRoot: Optional. The URL root from which all sources are relative. • sourcesContent: Optional. An array of contents of the original source files. • mappings: A string of base64 VLQs which contain the actual mappings. • file: Optional.
The generated filename this source map is associated with. Var generator = sourceMap. FromSourceMap(consumer); SourceMapGenerator.prototype.addMapping(mapping) Add a single mapping from original source line and column to the generated source's line and column for this source map being created. The mapping object should have the following properties: • generated: An object with the generated line and column positions. • original: An object with the original line and column positions. • source: The original source file (relative to the sourceRoot). • name: An optional original token name for this mapping.
SetSourceContent( 'module-one.scm ', fs. ReadFileSync( 'path/to/module-one.scm ')) SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) Applies a SourceMap for a source file to the SourceMap. Each mapping to the supplied source file is rewritten using the supplied SourceMap. Note: The resolution for the resulting mappings is the minimum of this map and the supplied map. • sourceMapConsumer: The SourceMap to be applied. • sourceFile: Optional.
The filename of the source file. If omitted, sourceMapConsumer.file will be used, if it exists. Otherwise an error will be thrown. • sourceMapPath: Optional. The dirname of the path to the SourceMap to be applied. If relative, it is relative to the SourceMap. This parameter is needed when the two SourceMaps aren't in the same directory, and the SourceMap to be applied contains relative source paths.
If so, those relative source paths need to be rewritten relative to the SourceMap. If omitted, it is assumed that both SourceMaps are in the same directory, thus not needing any rewriting. (Supplying '.' Has the same effect.) SourceMapGenerator.prototype.toString() Renders the source map being generated to a string.
Var lhs = new SourceNode( 1, 2, 'a.rs ', 'my_copy '); var operand = new SourceNode( 3, 4, 'a.rs ', '= '); var rhs = new SourceNode( 5, 6, 'a.rs ', 'orig.clone() '); var node = new SourceNode( null, null, null, [ lhs, operand, rhs ]); var joinedNode = node. Join( ' '); SourceNode.prototype.replaceRight(pattern, replacement) Call String.prototype.replace on the very right-most source snippet. Ati Radeon X1300 Driver Windows 7 Free Download. Useful for trimming white space from the end of a source node, etc.
• pattern: The pattern to replace. • replacement: The thing to replace the pattern with.