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

armlet

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

armlet - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

5

index.js

@@ -8,3 +8,3 @@ const url = require('url')

const analyze = (bytecode, apiKey, inputApiUrl = defaultApiUrl) => {
module.exports = (bytecode, apiKey, inputApiUrl = defaultApiUrl) => {
return new Promise((resolve, reject) => {

@@ -34,4 +34,1 @@ if (bytecode === undefined) {

}
module.exports = analyze
module.exports.analyze = analyze

2

package.json
{
"name": "armlet",
"version": "0.1.4",
"version": "0.1.5",
"description": "A Mythril Platform API client.",

@@ -5,0 +5,0 @@ "main": "index.js",

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

const armlet = require('../index')
const { analyze } = require('../index')
const analyze = require('../index')
const sinon = require('sinon')

@@ -31,7 +30,7 @@ const url = require('url')

it('should be a function', () => {
armlet.should.be.a('function')
analyze.should.be.a('function')
})
it('should return a thenable', () => {
const result = armlet(bytecode, apiKey)
const result = analyze(bytecode, apiKey)

@@ -42,36 +41,12 @@ result.then.should.be.a('function')

it('should require a bytecode param', async () => {
await armlet(undefined, apiKey).should.be.rejectedWith(TypeError)
await analyze(undefined, apiKey).should.be.rejectedWith(TypeError)
})
it('should require an apiKey param', async () => {
await armlet(bytecode).should.be.rejectedWith(TypeError)
await analyze(bytecode).should.be.rejectedWith(TypeError)
})
it('should require a valid api URL if given', async () => {
await armlet(bytecode, apiKey, 'not-a-real-url').should.be.rejectedWith(TypeError)
await analyze(bytecode, apiKey, 'not-a-real-url').should.be.rejectedWith(TypeError)
})
describe('#analyze', () => {
it('should be function', () => {
analyze.should.be.a('function')
})
it('should return a thenable', () => {
const result = analyze(bytecode, apiKey)
result.then.should.be.a('function')
})
it('should require a bytecode param', async () => {
await analyze(undefined, apiKey).should.be.rejectedWith(TypeError)
})
it('should require an apiKey param', async () => {
await analyze(bytecode).should.be.rejectedWith(TypeError)
})
it('should require a valid api URL if given', async () => {
await analyze(bytecode, apiKey, 'not-a-real-url').should.be.rejectedWith(TypeError)
})
})
})

@@ -78,0 +53,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