Skip to main content
Glama

Neon MCP Server

by fefergrgrgrg
currency.js2.03 kB
'use strict'; angular.module('insight.currency').controller('CurrencyController', function($scope, $rootScope, Currency) { $rootScope.currency.symbol = defaultCurrency; var _roundFloat = function(x, n) { if(!parseInt(n, 10) || !parseFloat(x)) n = 0; return Math.round(x * Math.pow(10, n)) / Math.pow(10, n); }; $rootScope.currency.getConvertion = function(value) { value = value * 1; // Convert to number if (!isNaN(value) && typeof value !== 'undefined' && value !== null) { if (value === 0.00000000) return '0 ' + this.symbol; // fix value to show var response = value; /* if (this.symbol === 'USD') { response = _roundFloat((value * this.factor), 2); } else if (this.symbol === 'mAUR') { this.factor = 1000; response = _roundFloat((value * this.factor), 5); } else if (this.symbol === 'bits') { this.factor = 1000000; response = _roundFloat((value * this.factor), 2); } else { this.factor = 1; response = value; } */ // prevent sci notation if (response < 1e-7) response=response.toFixed(8); return response + ' ' + this.symbol; } return 'value error'; }; $scope.setCurrency = function(currency) { $rootScope.currency.symbol = currency; localStorage.setItem('insight-currency', currency); if (currency === 'USD') { Currency.get({}, function(res) { $rootScope.currency.factor = $rootScope.currency.bitstamp = res.data.bitstamp; }); } /*else if (currency === 'mAUR') { $rootScope.currency.factor = 1000; } else if (currency === 'bits') { $rootScope.currency.factor = 1000000; } */ else { $rootScope.currency.factor = 1; } }; // Get initial value Currency.get({}, function(res) { $rootScope.currency.factor = $rootScope.currency.bitstamp = res.data.bitstamp; }); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fefergrgrgrg/neon-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server