Files
smart-city-digital-twin-mar…/smart-app-city/frontend/node_modules/es-abstract/2022/Number/exponentiate.js
Eric FELIXINE e30ae8ed09 feat(smart-app): implement complete mobile app MVP
- App.tsx: full navigation (Auth stack + Main tabs with 5 screens)
- Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen
- HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors
- MapScreen: interactive map with layer toggles (6 layers)
- MarketplaceScreen: categories (6), products (5), search
- ChatScreen: AI chat with quick prompts (4), bot responses
- ProfileScreen: user info, stats, menu (9 items), logout
- AlertsScreen: alert list with severity, acknowledge
- SensorsScreen: sensor list with type filters (6 types), search
- ZonesScreen: zone cards with stats
- SettingsScreen: language picker (FR/EN/ES/DE), privacy, about
- Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n
- Hooks: useSensors, useAlerts, useNotifications, useLocation
- Components: Card, Button, LoadingSpinner, ErrorBoundary, Header
- Services: iotService, notificationService (with axios API client)
- Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN)
- Theme: colors.ts with full design system (Blue Ocean palette)
- Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
2026-06-01 18:00:35 -04:00

75 lines
1.7 KiB
JavaScript

'use strict';
// var isNegativeZero = require('math-intrinsics/isNegativeZero');
var $pow = require('math-intrinsics/pow');
var $TypeError = require('es-errors/type');
/*
var abs = require('math-intrinsics/abs');
var isFinite = require('math-intrinsics/isFinite');
var isNaN = require('math-intrinsics/isNaN');
var IsInteger = require('math-intrinsics/isInteger');
*/
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-exponentiate
/* eslint max-lines-per-function: 0, max-statements: 0 */
module.exports = function NumberExponentiate(base, exponent) {
if (typeof base !== 'number' || typeof exponent !== 'number') {
throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be Numbers');
}
return $pow(base, exponent);
/*
if (isNaN(exponent)) {
return NaN;
}
if (exponent === 0) {
return 1;
}
if (isNaN(base)) {
return NaN;
}
var aB = abs(base);
if (aB > 1 && exponent === Infinity) {
return Infinity;
}
if (aB > 1 && exponent === -Infinity) {
return 0;
}
if (aB === 1 && (exponent === Infinity || exponent === -Infinity)) {
return NaN;
}
if (aB < 1 && exponent === Infinity) {
return +0;
}
if (aB < 1 && exponent === -Infinity) {
return Infinity;
}
if (base === Infinity) {
return exponent > 0 ? Infinity : 0;
}
if (base === -Infinity) {
var isOdd = true;
if (exponent > 0) {
return isOdd ? -Infinity : Infinity;
}
return isOdd ? -0 : 0;
}
if (exponent > 0) {
return isNegativeZero(base) ? Infinity : 0;
}
if (isNegativeZero(base)) {
if (exponent > 0) {
return isOdd ? -0 : 0;
}
return isOdd ? -Infinity : Infinity;
}
if (base < 0 && isFinite(base) && isFinite(exponent) && !IsInteger(exponent)) {
return NaN;
}
*/
};