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

apibuilder-js

Package Overview
Dependencies
Maintainers
1
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.9 to 0.0.10

2

dist/type/definition.d.ts

@@ -357,3 +357,3 @@ import { FullyQualifiedName } from '../language';

*/
get nickname(): void;
get nickname(): string;
get url(): string;

@@ -360,0 +360,0 @@ get path(): string;

@@ -16,2 +16,5 @@ "use strict";

}
function pascalCase(string) {
return lodash_1.upperFirst(lodash_1.camelCase(string));
}
/**

@@ -655,3 +658,23 @@ * An array is an enclosing type which points to another type.

get: function () {
throw new Error('Not Implemented');
var path = this.config.path;
if (this.resource.path != null) {
path = path.replace(this.resource.path, '');
}
if (path.startsWith('/')) {
path = path.slice(1);
}
var parts = path.split('/');
var dynamicParts = parts.filter(function (part) {
return part.startsWith(':');
}).map(function (part, index) {
var prefix = index === 0 ? 'By' : 'And';
return prefix + pascalCase(part);
});
var staticParts = parts.filter(function (part) {
return !part.startsWith(':');
}).map(function (part, index) {
var prefix = index === 0 ? '' : 'And';
return prefix + pascalCase(part);
});
return this.method.toLowerCase() + staticParts.concat(dynamicParts).join('');
},

@@ -658,0 +681,0 @@ enumerable: true,

{
"name": "apibuilder-js",
"version": "0.0.9",
"version": "0.0.10",
"description": "A reference implementation of API Builder for JavaScript",

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

@@ -33,2 +33,6 @@ import { camelCase, flatMap, map, matchesProperty, overSome, snakeCase, toUpper, upperFirst } from 'lodash';

function pascalCase(string: string) {
return upperFirst(camelCase(string));
}
export interface ApiBuilderAnnotationConfig {

@@ -772,3 +776,29 @@ readonly name: string;

get nickname() {
throw new Error('Not Implemented');
let path = this.config.path;
if (this.resource.path != null) {
path = path.replace(this.resource.path, '');
}
if (path.startsWith('/')) {
path = path.slice(1);
}
const parts = path.split('/');
const dynamicParts = parts.filter((part) => {
return part.startsWith(':');
}).map((part, index) => {
const prefix = index === 0 ? 'By' : 'And';
return prefix + pascalCase(part);
});
const staticParts = parts.filter((part) => {
return !part.startsWith(':');
}).map((part, index) => {
const prefix = index === 0 ? '' : 'And';
return prefix + pascalCase(part);
});
return this.method.toLowerCase() + staticParts.concat(dynamicParts).join('');
}

@@ -775,0 +805,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