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

esmify

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esmify - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

resolve.js

4

esmify.js

@@ -1,3 +0,3 @@

const resolve = require('./lib/resolve');
const { createTransform } = require('./lib/transform');
const resolve = require('./resolve');
const { createTransform } = require('./transform');
const path = require('path');

@@ -4,0 +4,0 @@ const through = require('through2');

{
"name": "esmify",
"version": "1.0.3",
"version": "1.0.4",
"description": "parse and handle import/export for browserify",

@@ -5,0 +5,0 @@ "main": "./esmify.js",

@@ -54,4 +54,13 @@ # esmify

#### `require('esmify/resolve')(id, opts, cb)`
Resolve the given `id` using the module resolution algorithm from `esmify`, accepting `{ mainFields }` array to opts as well as other options passed to [resolve](https://www.npmjs.com/package/resolve) and [browser-resolve](https://www.npmjs.com/package/browser-resolve).
Works like so:
- If mainFields includes a `"browser"` field, use `browser-resolve`, otherwise use `resolve`
- Look for package.json fields in order of `mainFields`, the first field that exists will be used
## License
MIT, see [LICENSE.md](http://github.com/mattdesl/esmify/blob/master/LICENSE.md) for details.
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