Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sorcery

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sorcery

Resolve a chain of sourcemaps back to the original source

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
263K
decreased by-15.08%
Maintainers
1
Weekly downloads
 
Created

What is sorcery?

The 'sorcery' npm package is used for working with source maps. It allows you to resolve, manipulate, and generate source maps, which are crucial for debugging minified JavaScript code.

What are sorcery's main functionalities?

Resolve Source Maps

This feature allows you to resolve the source maps for a given file. The code sample demonstrates how to load a file and resolve its source maps, then write the resolved source maps back to the file.

const sorcery = require('sorcery');
sorcery.load('path/to/your/file.js').then(function (chain) {
  chain.write();
});

Generate Source Maps

This feature allows you to generate new source maps for a given file. The code sample shows how to load a file, generate source maps with the content included, and write the new source maps back to the file.

const sorcery = require('sorcery');
sorcery.load('path/to/your/file.js').then(function (chain) {
  chain.apply({ includeContent: true }).write();
});

Manipulate Source Maps

This feature allows you to manipulate existing source maps. The code sample demonstrates how to load a file, apply changes to its source maps, and write the manipulated source maps to a new destination file.

const sorcery = require('sorcery');
sorcery.load('path/to/your/file.js').then(function (chain) {
  chain.apply({ includeContent: true });
  chain.write({ dest: 'path/to/output/file.js' });
});

Other packages similar to sorcery

FAQs

Package last updated on 15 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc