MCPcopy Create free account
hub / github.com/serverless/examples / getRuntime

Function getRuntime

generate-readme.js:30–50  ·  view source on GitHub ↗
(dirname)

Source from the content-addressed store, hash-verified

28};
29
30const getRuntime = (dirname) => {
31 if (!dirname) {
32 return "unknown";
33 }
34 if (dirname.match(/node/)) {
35 return "nodeJS";
36 } else if (dirname.match(/python/)) {
37 return "python";
38 } else if (dirname.match(/swift/)) {
39 return "swift";
40 } else if (dirname.match(/php/)) {
41 return "php";
42 } else if (dirname.match(/ruby/)) {
43 return "ruby";
44 } else if (dirname.match(/golang/)) {
45 return "golang";
46 } else if (dirname.match(/dotnet/)) {
47 return "dotnet";
48 }
49 return "unknown";
50};
51
52const config = {
53 transforms: {

Callers 1

SERVERLESS_EXAMPLE_TABLEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected