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

solidity-extract-imports

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solidity-extract-imports - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

test-against-parser.js

4

index.js

@@ -13,5 +13,5 @@ 'use strict'

{ '*': 3, '/': 4 },
{ '*': 5 },
{ '\n': 1 },
{ '*': 5 },
{ '/': 1, default: 4 },
{ '/': 1, default: 3 },
{ '"': 1, '\\': 7 },

@@ -18,0 +18,0 @@ { default: 6 },

{
"name": "solidity-extract-imports",
"version": "0.1.3",
"version": "0.1.4",
"description": "A simple tool to extract imports from Solidity source files",

@@ -12,4 +12,6 @@ "main": "index.js",

"devDependencies": {
"mocha": "^5.2.0"
"got": "^8.3.1",
"mocha": "^5.2.0",
"solidity-parser-antlr": "^0.2.11"
}
}

@@ -122,2 +122,28 @@ 'use strict'

});
it('handles line comments before the imports', function () {
var test = `
// hello world
import "./abc.sol" as x;
`
assert.deepEqual(extract(test), ['./abc.sol'])
})
it('handles block comments before the imports', function () {
var test = `
/* hello world */
import "./abc.sol" as x;
`
assert.deepEqual(extract(test), ['./abc.sol'])
})
it('handles multi-line block comments before the imports', function () {
var test = `
/* hello
* world
*/
import "./abc.sol" as x;
`
assert.deepEqual(extract(test), ['./abc.sol'])
})
})
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