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

apibuilder-js

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apibuilder-js - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

4

dist/type/definition.d.ts

@@ -158,2 +158,6 @@ import { FullyQualifiedName } from '../language';

/**
* This property holds the value of the enum value.
*/
get value(): string;
/**
* A string used to identify this enumeration value. Useful for naming the

@@ -160,0 +164,0 @@ * variable corresponding to this enumeration value in code generators.

@@ -249,2 +249,12 @@ "use strict";

});
Object.defineProperty(ApiBuilderEnumValue.prototype, "value", {
/**
* This property holds the value of the enum value.
*/
get: function () {
return this.config.value || this.config.name;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ApiBuilderEnumValue.prototype, "nickname", {

@@ -251,0 +261,0 @@ /**

2

package.json
{
"name": "apibuilder-js",
"version": "0.0.16",
"version": "0.0.17",
"description": "A reference implementation of API Builder for JavaScript",

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

@@ -332,2 +332,9 @@ /* eslint-disable max-classes-per-file, import/no-cycle, @typescript-eslint/no-use-before-define */

/**
* This property holds the value of the enum value.
*/
get value(): string {
return this.config.value || this.config.name;
}
/**
* A string used to identify this enumeration value. Useful for naming the

@@ -334,0 +341,0 @@ * variable corresponding to this enumeration value in code generators.

@@ -27,2 +27,3 @@ import faker from 'faker';

attributes: defaultTo(config.attributes, []),
value: config.value,
};

@@ -29,0 +30,0 @@ }

@@ -18,2 +18,14 @@ import faker from 'faker';

test('should return value when set', () => {
const config = createMockEnumValue({ name: 'no_remaining_balance', value: 'NO_REMAINING_BALANCE' });
const instance = new ApiBuilderEnumValue(config);
expect(instance).toHaveProperty('value', 'NO_REMAINING_BALANCE');
});
test('should return name when value is not set', () => {
const config = createMockEnumValue({ name: 'no_remaining_balance' });
const instance = new ApiBuilderEnumValue(config);
expect(instance).toHaveProperty('value', 'no_remaining_balance');
});
test('should have constant case nickname', () => {

@@ -20,0 +32,0 @@ const config = createMockEnumValue({ name: 'no_remaining_balance' });

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