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

detective-es6

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detective-es6 - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

15

index.js

@@ -12,3 +12,3 @@ 'use strict';

*/
module.exports = function(src, options) {
module.exports = function(src, options = {}) {
if (src === undefined) throw new Error('src not given');

@@ -23,7 +23,7 @@ if (src === '') return [];

case 'ImportDeclaration': {
if (options && options.skipTypeImports && node.importKind === 'type') {
if (options.skipTypeImports && node.importKind === 'type') {
break;
}
if (node.source && node.source.value) {
if (node.source?.value) {
dependencies.push(node.source.value);

@@ -37,3 +37,3 @@ }

case 'ExportAllDeclaration': {
if (node.source && node.source.value) {
if (node.source?.value) {
dependencies.push(node.source.value);

@@ -46,9 +46,8 @@ }

case 'CallExpression': {
if (options && options.skipAsyncImports) {
if (options.skipAsyncImports) {
break;
}
if (node.callee.type === 'Import' && node.arguments.length > 0 &&
node.arguments[0].value) {
dependencies.push(node.arguments[0].value);
if (node.callee.type === 'Import' && node.arguments?.[0].value) {
dependencies.push(node.arguments?.[0].value);
}

@@ -55,0 +54,0 @@

{
"name": "detective-es6",
"version": "4.0.0",
"version": "4.0.1",
"description": "Get the dependencies of an ES6 module",

@@ -39,3 +39,3 @@ "main": "index.js",

"dependencies": {
"node-source-walk": "^6.0.0"
"node-source-walk": "^6.0.1"
},

@@ -42,0 +42,0 @@ "devDependencies": {

# detective-es6
[![CI](https://img.shields.io/github/actions/workflow/status/dependents/node-detective-es6/ci.yml?branch=main&label=CI&logo=github)](https://github.com/dependents/node-detective-es6/actions/workflows/ci.yml?query=branch%3Amain)
[![npm version](https://img.shields.io/npm/v/detective-es6)](https://www.npmjs.com/package/detective-es6)
[![npm version](https://img.shields.io/npm/v/detective-es6?logo=npm&logoColor=fff)](https://www.npmjs.com/package/detective-es6)
[![npm downloads](https://img.shields.io/npm/dm/detective-es6)](https://www.npmjs.com/package/detective-es6)

@@ -6,0 +6,0 @@

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