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

fabric-contract-api

Package Overview
Dependencies
Maintainers
1
Versions
221
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fabric-contract-api - npm Package Compare versions

Comparing version 1.4.0-snapshot.46 to 1.4.0-snapshot.47

6

lib/contract.js

@@ -28,6 +28,6 @@ /*

this.__isContract = true;
if (name && name.trim() !== '') {
if (typeof name === 'undefined' || name === null) {
this.name = this.constructor.name;
} else {
this.name = name.trim();
} else {
this.name = '';
}

@@ -34,0 +34,0 @@ }

{
"name": "fabric-contract-api",
"version": "1.4.0-snapshot.46",
"version": "1.4.0-snapshot.47",
"tag": "unstable",

@@ -5,0 +5,0 @@ "description": "A node.js implementation of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other",

@@ -64,4 +64,12 @@ /*

class SCBeta extends Contract {
/** */
constructor() {
super();
}
}
describe('contract.js', () => {

@@ -83,3 +91,3 @@

const sc0 = new Contract();
expect(sc0.getName()).to.equal('');
expect(sc0.getName()).to.equal('Contract');

@@ -115,2 +123,6 @@ // should also create default when the supplied name is empty space

expect(sc2.getName()).to.equal('somewhat.padded.out');
const sc3 = new SCBeta();
expect(sc3.name).to.equal('SCBeta');
expect(sc3.getName()).to.equal('SCBeta');
});

@@ -117,0 +129,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