How to use Boolean method in chai

Best JavaScript code snippet using chai

config.ts

Source:config.ts Github

copy

Full Screen

1// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.2// See LICENSE.txt for license information.3import {CollapsedThreads} from '../constants/config';4import {ThemeKey} from './themes';5export type ClientConfig = {6 AboutLink: string;7 AllowBannerDismissal: string;8 AllowCustomThemes: string;9 AllowedThemes: string;10 AndroidAppDownloadLink: string;11 AndroidLatestVersion: string;12 AndroidMinVersion: string;13 AppDownloadLink: string;14 AsymmetricSigningPublicKey: string;15 AvailableLocales: string;16 BannerColor: string;17 BannerText: string;18 BannerTextColor: string;19 BuildDate: string;20 BuildEnterpriseReady: string;21 BuildHash: string;22 BuildHashEnterprise: string;23 BuildNumber: string;24 CollapsedThreads: CollapsedThreads;25 CustomBrandText: string;26 CustomDescriptionText: string;27 CustomTermsOfServiceId: string;28 CustomTermsOfServiceReAcceptancePeriod: string;29 CustomUrlSchemes: string;30 CWSURL: string;31 DataRetentionEnableFileDeletion: string;32 DataRetentionEnableMessageDeletion: string;33 DataRetentionFileRetentionDays: string;34 DataRetentionMessageRetentionDays: string;35 DefaultClientLocale: string;36 DefaultTheme: ThemeKey;37 DiagnosticId: string;38 DiagnosticsEnabled: string;39 EmailLoginButtonBorderColor: string;40 EmailLoginButtonColor: string;41 EmailLoginButtonTextColor: string;42 EmailNotificationContentsType: string;43 EnableAskCommunityLink: string;44 EnableBanner: string;45 EnableBotAccountCreation: string;46 EnableChannelViewedMessages: string;47 EnableClientPerformanceDebugging: string;48 EnableCluster: string;49 EnableCommands: string;50 EnableCompliance: string;51 EnableConfirmNotificationsToChannel: string;52 EnableCustomBrand: string;53 EnableCustomEmoji: string;54 EnableCustomGroups: string;55 EnableCustomUserStatuses: string;56 EnableTimedDND: string;57 EnableCustomTermsOfService: string;58 EnableDeveloper: string;59 EnableDiagnostics: string;60 EnableEmailBatching: string;61 EnableEmailInvitations: string;62 EnableEmojiPicker: string;63 EnableFileAttachments: string;64 EnableFile: string;65 EnableGifPicker: string;66 EnableGuestAccounts: string;67 EnableIncomingWebhooks: string;68 EnableLatex: string;69 EnableInlineLatex: string;70 EnableLdap: string;71 EnableLinkPreviews: string;72 EnableMarketplace: string;73 EnableMetrics: string;74 EnableMobileFileDownload: string;75 EnableMobileFileUpload: string;76 EnableMultifactorAuthentication: string;77 EnableOAuthServiceProvider: string;78 EnableOpenServer: string;79 EnableOutgoingWebhooks: string;80 EnablePostIconOverride: string;81 EnablePostUsernameOverride: string;82 EnablePreviewFeatures: string;83 EnablePreviewModeBanner: string;84 EnablePublicLink: string;85 EnableReliableWebSockets: string;86 EnableSaml: string;87 EnableSignInWithEmail: string;88 EnableSignInWithUsername: string;89 EnableSignUpWithEmail: string;90 EnableSignUpWithGitLab: string;91 EnableSignUpWithGoogle: string;92 EnableSignUpWithOffice365: string;93 EnableSignUpWithOpenId: string;94 EnableSVGs: string;95 EnableTesting: string;96 EnableThemeSelection: string;97 EnableTutorial: string;98 EnableOnboardingFlow: string;99 EnableUserAccessTokens: string;100 EnableUserCreation: string;101 EnableUserDeactivation: string;102 EnableUserTypingMessages: string;103 EnforceMultifactorAuthentication: string;104 ExperimentalClientSideCertCheck: string;105 ExperimentalClientSideCertEnable: string;106 ExperimentalCloudBilling: string;107 ExperimentalCloudUserLimit: string;108 ExperimentalDataPrefetch: string;109 ExperimentalEnableAuthenticationTransfer: string;110 ExperimentalEnableAutomaticReplies: string;111 ExperimentalEnableClickToReply: string;112 ExperimentalEnableDefaultChannelLeaveJoinMessages: string;113 ExperimentalEnablePostMetadata: string;114 ExperimentalGroupUnreadChannels: string;115 ExperimentalPrimaryTeam: string;116 ExperimentalTimezone: string;117 ExperimentalViewArchivedChannels: string;118 FileLevel: string;119 GfycatAPIKey: string;120 GfycatAPISecret: string;121 GoogleDeveloperKey: string;122 GuestAccountsEnforceMultifactorAuthentication: string;123 HasImageProxy: string;124 HelpLink: string;125 IosAppDownloadLink: string;126 IosLatestVersion: string;127 IosMinVersion: string;128 InstallationDate: string;129 IsDefaultMarketplace: string;130 LdapFirstNameAttributeSet: string;131 LdapLastNameAttributeSet: string;132 LdapLoginButtonBorderColor: string;133 LdapLoginButtonColor: string;134 LdapLoginButtonTextColor: string;135 LdapLoginFieldName: string;136 LdapNicknameAttributeSet: string;137 LdapPositionAttributeSet: string;138 LdapPictureAttributeSet: string;139 LockTeammateNameDisplay: string;140 ManagedResourcePaths: string;141 MaxFileSize: string;142 MaxPostSize: string;143 MaxNotificationsPerChannel: string;144 MinimumHashtagLength: string;145 NoAccounts: string;146 GitLabButtonText: string;147 GitLabButtonColor: string;148 OpenIdButtonText: string;149 OpenIdButtonColor: string;150 PasswordMinimumLength: string;151 PasswordRequireLowercase: string;152 PasswordRequireNumber: string;153 PasswordRequireSymbol: string;154 PasswordRequireUppercase: string;155 PluginsEnabled: string;156 PostEditTimeLimit: string;157 PrivacyPolicyLink: string;158 ReportAProblemLink: string;159 RequireEmailVerification: string;160 RestrictDirectMessage: string;161 RunJobs: string;162 SamlFirstNameAttributeSet: string;163 SamlLastNameAttributeSet: string;164 SamlLoginButtonBorderColor: string;165 SamlLoginButtonColor: string;166 SamlLoginButtonText: string;167 SamlLoginButtonTextColor: string;168 SamlNicknameAttributeSet: string;169 SamlPositionAttributeSet: string;170 SchemaVersion: string;171 SendEmailNotifications: string;172 SendPushNotifications: string;173 ShowEmailAddress: string;174 SiteName: string;175 SiteURL: string;176 SQLDriverName: string;177 SupportEmail: string;178 TeammateNameDisplay: string;179 TermsOfServiceLink: string;180 TimeBetweenUserTypingUpdatesMilliseconds: string;181 UpgradedFromTE: string;182 Version: string;183 WebsocketPort: string;184 WebsocketSecurePort: string;185 WebsocketURL: string;186 ExperimentalSharedChannels: string;187};188export type License = {189 id: string;190 issued_at: number;191 starts_at: number;192 expires_at: string;193 customer: LicenseCustomer;194 features: LicenseFeatures;195 sku_name: string;196 short_sku_name: string;197};198export type LicenseCustomer = {199 id: string;200 name: string;201 email: string;202 company: string;203};204export type LicenseFeatures = {205 users?: number;206 ldap?: boolean;207 ldap_groups?: boolean;208 mfa?: boolean;209 google_oauth?: boolean;210 office365_oauth?: boolean;211 compliance?: boolean;212 cluster?: boolean;213 metrics?: boolean;214 mhpns?: boolean;215 saml?: boolean;216 elastic_search?: boolean;217 announcement?: boolean;218 theme_management?: boolean;219 email_notification_contents?: boolean;220 data_retention?: boolean;221 message_export?: boolean;222 custom_permissions_schemes?: boolean;223 custom_terms_of_service?: boolean;224 guest_accounts?: boolean;225 guest_accounts_permissions?: boolean;226 id_loaded?: boolean;227 lock_teammate_name_display?: boolean;228 cloud?: boolean;229 future_features?: boolean;230};231export type ClientLicense = Record<string, string>;232export type DataRetentionPolicy = {233 message_deletion_enabled: boolean;234 file_deletion_enabled: boolean;235 message_retention_cutoff: number;236 file_retention_cutoff: number;237};238export type ServiceSettings = {239 SiteURL: string;240 WebsocketURL: string;241 LicenseFileLocation: string;242 ListenAddress: string;243 ConnectionSecurity: string;244 TLSCertFile: string;245 TLSKeyFile: string;246 TLSMinVer: string;247 TLSStrictTransport: boolean;248 TLSStrictTransportMaxAge: number;249 TLSOverwriteCiphers: string[];250 UseLetsEncrypt: boolean;251 LetsEncryptCertificateCacheFile: string;252 Forward80To443: boolean;253 TrustedProxyIPHeader: string[];254 ReadTimeout: number;255 WriteTimeout: number;256 IdleTimeout: number;257 MaximumLoginAttempts: number;258 GoroutineHealthThreshold: number;259 GoogleDeveloperKey: string;260 EnableOAuthServiceProvider: boolean;261 EnableIncomingWebhooks: boolean;262 EnableOutgoingWebhooks: boolean;263 EnableCommands: boolean;264 EnablePostUsernameOverride: boolean;265 EnablePostIconOverride: boolean;266 EnableLinkPreviews: boolean;267 EnableTesting: boolean;268 EnableDeveloper: boolean;269 EnableOpenTracing: boolean;270 EnableSecurityFixAlert: boolean;271 EnableInsecureOutgoingConnections: boolean;272 AllowedUntrustedInternalConnections: string;273 EnableMultifactorAuthentication: boolean;274 EnforceMultifactorAuthentication: boolean;275 EnableUserAccessTokens: boolean;276 AllowCorsFrom: string;277 CorsExposedHeaders: string;278 CorsAllowCredentials: boolean;279 CorsDebug: boolean;280 AllowCookiesForSubdomains: boolean;281 ExtendSessionLengthWithActivity: boolean;282 SessionLengthWebInDays: number;283 SessionLengthMobileInDays: number;284 SessionLengthSSOInDays: number;285 SessionCacheInMinutes: number;286 SessionIdleTimeoutInMinutes: number;287 WebsocketSecurePort: number;288 WebsocketPort: number;289 WebserverMode: string;290 EnableCustomEmoji: boolean;291 EnableEmojiPicker: boolean;292 EnableGifPicker: boolean;293 GfycatApiKey: string;294 GfycatApiSecret: string;295 PostEditTimeLimit: number;296 TimeBetweenUserTypingUpdatesMilliseconds: number;297 EnablePostSearch: boolean;298 MinimumHashtagLength: number;299 EnableUserTypingMessages: boolean;300 EnableChannelViewedMessages: boolean;301 EnableUserStatuses: boolean;302 ExperimentalEnableAuthenticationTransfer: boolean;303 ClusterLogTimeoutMilliseconds: number;304 EnablePreviewFeatures: boolean;305 EnableTutorial: boolean;306 EnableOnboardingFlow: boolean;307 ExperimentalEnableDefaultChannelLeaveJoinMessages: boolean;308 ExperimentalGroupUnreadChannels: string;309 ExperimentalDataPrefetch: boolean;310 EnableAPITeamDeletion: boolean;311 ExperimentalEnableHardenedMode: boolean;312 ExperimentalStrictCSRFEnforcement: boolean;313 EnableEmailInvitations: boolean;314 DisableBotsWhenOwnerIsDeactivated: boolean;315 EnableBotAccountCreation: boolean;316 EnableSVGs: boolean;317 EnableLatex: boolean;318 EnableLocalMode: boolean;319 LocalModeSocketLocation: string;320 CollapsedThreads: 'disabled' | 'default_on' | 'default_off';321 ThreadAutoFollow: boolean;322};323export type TeamSettings = {324 SiteName: string;325 MaxUsersPerTeam: number;326 EnableCustomUserStatuses: boolean;327 EnableUserCreation: boolean;328 EnableOpenServer: boolean;329 EnableUserDeactivation: boolean;330 RestrictCreationToDomains: string;331 EnableCustomBrand: boolean;332 CustomBrandText: string;333 CustomDescriptionText: string;334 RestrictDirectMessage: string;335 UserStatusAwayTimeout: number;336 MaxChannelsPerTeam: number;337 MaxNotificationsPerChannel: number;338 EnableConfirmNotificationsToChannel: boolean;339 TeammateNameDisplay: string;340 ExperimentalViewArchivedChannels: boolean;341 ExperimentalEnableAutomaticReplies: boolean;342 LockTeammateNameDisplay: boolean;343 ExperimentalPrimaryTeam: string;344 ExperimentalDefaultChannels: string[];345};346export type ClientRequirements = {347 AndroidLatestVersion: string;348 AndroidMinVersion: string;349 IosLatestVersion: string;350 IosMinVersion: string;351};352export type SqlSettings = {353 DriverName: string;354 DataSource: string;355 DataSourceReplicas: string[];356 DataSourceSearchReplicas: string[];357 MaxIdleConns: number;358 ConnMaxLifetimeMilliseconds: number;359 MaxOpenConns: number;360 Trace: boolean;361 AtRestEncryptKey: string;362 QueryTimeout: number;363 DisableDatabaseSearch: boolean;364};365export type LogSettings = {366 EnableConsole: boolean;367 ConsoleLevel: string;368 ConsoleJson: boolean;369 EnableFile: boolean;370 FileLevel: string;371 FileJson: boolean;372 FileLocation: string;373 EnableWebhookDebugging: boolean;374 EnableDiagnostics: boolean;375 EnableSentry: boolean;376};377export type ExperimentalAuditSettings = {378 SysLogEnabled: boolean;379 SysLogIP: string;380 SysLogPort: number;381 SysLogTag: string;382 SysLogCert: string;383 SysLogInsecure: boolean;384 SysLogMaxQueueSize: number;385 FileEnabled: boolean;386 FileName: string;387 FileMaxSizeMB: number;388 FileMaxAgeDays: number;389 FileMaxBackups: number;390 FileCompress: boolean;391 FileMaxQueueSize: number;392};393export type NotificationLogSettings = {394 EnableConsole: boolean;395 ConsoleLevel: string;396 ConsoleJson: boolean;397 EnableFile: boolean;398 FileLevel: string;399 FileJson: boolean;400 FileLocation: string;401};402export type PasswordSettings = {403 MinimumLength: number;404 Lowercase: boolean;405 Number: boolean;406 Uppercase: boolean;407 Symbol: boolean;408};409export type FileSettings = {410 EnableFileAttachments: boolean;411 EnableMobileUpload: boolean;412 EnableMobileDownload: boolean;413 MaxFileSize: number;414 DriverName: string;415 Directory: string;416 EnablePublicLink: boolean;417 PublicLinkSalt: string;418 InitialFont: string;419 AmazonS3AccessKeyId: string;420 AmazonS3SecretAccessKey: string;421 AmazonS3Bucket: string;422 AmazonS3Region: string;423 AmazonS3Endpoint: string;424 AmazonS3SSL: boolean;425 AmazonS3SignV2: boolean;426 AmazonS3SSE: boolean;427 AmazonS3Trace: boolean;428};429export type EmailSettings = {430 EnableSignUpWithEmail: boolean;431 EnableSignInWithEmail: boolean;432 EnableSignInWithUsername: boolean;433 SendEmailNotifications: boolean;434 UseChannelInEmailNotifications: boolean;435 RequireEmailVerification: boolean;436 FeedbackName: string;437 FeedbackEmail: string;438 ReplyToAddress: string;439 FeedbackOrganization: string;440 EnableSMTPAuth: boolean;441 SMTPUsername: string;442 SMTPPassword: string;443 SMTPServer: string;444 SMTPPort: string;445 SMTPServerTimeout: number;446 ConnectionSecurity: string;447 SendPushNotifications: boolean;448 PushNotificationServer: string;449 PushNotificationContents: string;450 EnableEmailBatching: boolean;451 EmailBatchingBufferSize: number;452 EmailBatchingInterval: number;453 EnablePreviewModeBanner: boolean;454 SkipServerCertificateVerification: boolean;455 EmailNotificationContentsType: string;456 LoginButtonColor: string;457 LoginButtonBorderColor: string;458 LoginButtonTextColor: string;459};460export type RateLimitSettings = {461 Enable: boolean;462 PerSec: number;463 MaxBurst: number;464 MemoryStoreSize: number;465 VaryByRemoteAddr: boolean;466 VaryByUser: boolean;467 VaryByHeader: string;468};469export type PrivacySettings = {470 ShowEmailAddress: boolean;471 ShowFullName: boolean;472};473export type SupportSettings = {474 TermsOfServiceLink: string;475 PrivacyPolicyLink: string;476 AboutLink: string;477 HelpLink: string;478 ReportAProblemLink: string;479 SupportEmail: string;480 CustomTermsOfServiceEnabled: boolean;481 CustomTermsOfServiceReAcceptancePeriod: number;482};483export type AnnouncementSettings = {484 EnableBanner: boolean;485 BannerText: string;486 BannerColor: string;487 BannerTextColor: string;488 AllowBannerDismissal: boolean;489};490export type ThemeSettings = {491 EnableThemeSelection: boolean;492 DefaultTheme: string;493 AllowCustomThemes: boolean;494 AllowedThemes: string[];495};496export type SSOSettings = {497 Enable: boolean;498 Secret: string;499 Id: string;500 Scope: string;501 AuthEndpoint: string;502 TokenEndpoint: string;503 UserAPIEndpoint: string;504 DiscoveryEndpoint: string;505 ButtonText: string;506 ButtonColor: string;507};508export type Office365Settings = {509 Enable: boolean;510 Secret: string;511 Id: string;512 Scope: string;513 AuthEndpoint: string;514 TokenEndpoint: string;515 UserAPIEndpoint: string;516 DiscoveryEndpoint: string;517 DirectoryId: string;518};519export type LdapSettings = {520 Enable: boolean;521 EnableSync: boolean;522 LdapServer: string;523 LdapPort: number;524 ConnectionSecurity: string;525 BaseDN: string;526 BindUsername: string;527 BindPassword: string;528 UserFilter: string;529 GroupFilter: string;530 GuestFilter: string;531 EnableAdminFilter: boolean;532 AdminFilter: string;533 GroupDisplayNameAttribute: string;534 GroupIdAttribute: string;535 FirstNameAttribute: string;536 LastNameAttribute: string;537 EmailAttribute: string;538 UsernameAttribute: string;539 NicknameAttribute: string;540 IdAttribute: string;541 PositionAttribute: string;542 LoginIdAttribute: string;543 PictureAttribute: string;544 SyncIntervalMinutes: number;545 SkipCertificateVerification: boolean;546 QueryTimeout: number;547 MaxPageSize: number;548 LoginFieldName: string;549 LoginButtonColor: string;550 LoginButtonBorderColor: string;551 LoginButtonTextColor: string;552 Trace: boolean;553};554export type ComplianceSettings = {555 Enable: boolean;556 Directory: string;557 EnableDaily: boolean;558};559export type LocalizationSettings = {560 DefaultServerLocale: string;561 DefaultClientLocale: string;562 AvailableLocales: string;563};564export type SamlSettings = {565 Enable: boolean;566 EnableSyncWithLdap: boolean;567 EnableSyncWithLdapIncludeAuth: boolean;568 IgnoreGuestsLdapSync: boolean;569 Verify: boolean;570 Encrypt: boolean;571 SignRequest: boolean;572 IdpURL: string;573 IdpDescriptorURL: string;574 IdpMetadataURL: string;575 AssertionConsumerServiceURL: string;576 SignatureAlgorithm: string;577 CanonicalAlgorithm: string;578 ScopingIDPProviderId: string;579 ScopingIDPName: string;580 IdpCertificateFile: string;581 PublicCertificateFile: string;582 PrivateKeyFile: string;583 IdAttribute: string;584 GuestAttribute: string;585 EnableAdminAttribute: boolean;586 AdminAttribute: string;587 FirstNameAttribute: string;588 LastNameAttribute: string;589 EmailAttribute: string;590 UsernameAttribute: string;591 NicknameAttribute: string;592 LocaleAttribute: string;593 PositionAttribute: string;594 LoginButtonText: string;595 LoginButtonColor: string;596 LoginButtonBorderColor: string;597 LoginButtonTextColor: string;598};599export type NativeAppSettings = {600 AppDownloadLink: string;601 AndroidAppDownloadLink: string;602 IosAppDownloadLink: string;603};604export type ClusterSettings = {605 Enable: boolean;606 ClusterName: string;607 OverrideHostname: string;608 NetworkInterface: string;609 BindAddress: string;610 AdvertiseAddress: string;611 UseIPAddress: boolean;612 EnableExperimentalGossipEncryption: boolean;613 ReadOnlyConfig: boolean;614 GossipPort: number;615 StreamingPort: number;616 MaxIdleConns: number;617 MaxIdleConnsPerHost: number;618 IdleConnTimeoutMilliseconds: number;619};620export type MetricsSettings = {621 Enable: boolean;622 BlockProfileRate: number;623 ListenAddress: string;624};625export type ExperimentalSettings = {626 ClientSideCertEnable: boolean;627 ClientSideCertCheck: string;628 EnableClickToReply: boolean;629 LinkMetadataTimeoutMilliseconds: number;630 RestrictSystemAdmin: boolean;631 UseNewSAMLLibrary: boolean;632 CloudBilling: boolean;633};634export type AnalyticsSettings = {635 MaxUsersForStatistics: number;636};637export type ElasticsearchSettings = {638 ConnectionURL: string;639 Username: string;640 Password: string;641 EnableIndexing: boolean;642 EnableSearching: boolean;643 EnableAutocomplete: boolean;644 Sniff: boolean;645 PostIndexReplicas: number;646 PostIndexShards: number;647 ChannelIndexReplicas: number;648 ChannelIndexShards: number;649 UserIndexReplicas: number;650 UserIndexShards: number;651 AggregatePostsAfterDays: number;652 PostsAggregatorJobStartTime: string;653 IndexPrefix: string;654 LiveIndexingBatchSize: number;655 BulkIndexingTimeWindowSeconds: number;656 RequestTimeoutSeconds: number;657 SkipTLSVerification: boolean;658 Trace: string;659};660export type BleveSettings = {661 IndexDir: string;662 EnableIndexing: boolean;663 EnableSearching: boolean;664 EnableAutocomplete: boolean;665 BulkIndexingTimeWindowSeconds: number;666};667export type DataRetentionSettings = {668 EnableMessageDeletion: boolean;669 EnableFileDeletion: boolean;670 EnableBoardsDeletion: boolean;671 MessageRetentionDays: number;672 FileRetentionDays: number;673 BoardsRetentionDays: number;674 DeletionJobStartTime: string;675};676export type MessageExportSettings = {677 EnableExport: boolean;678 DownloadExportResults: boolean;679 ExportFormat: string;680 DailyRunTime: string;681 ExportFromTimestamp: number;682 BatchSize: number;683 GlobalRelaySettings: {684 CustomerType: string;685 SMTPUsername: string;686 SMTPPassword: string;687 EmailAddress: string;688 };689};690export type JobSettings = {691 RunJobs: boolean;692 RunScheduler: boolean;693};694export type PluginSettings = {695 Enable: boolean;696 EnableUploads: boolean;697 AllowInsecureDownloadURL: boolean;698 EnableHealthCheck: boolean;699 Directory: string;700 ClientDirectory: string;701 Plugins: Record<string, any>;702 PluginStates: Record<string, {Enable: boolean}>;703 EnableMarketplace: boolean;704 EnableRemoteMarketplace: boolean;705 AutomaticPrepackagedPlugins: boolean;706 RequirePluginSignature: boolean;707 MarketplaceURL: string;708 SignaturePublicKeyFiles: string[];709};710export type DisplaySettings = {711 CustomURLSchemes: string[];712 ExperimentalTimezone: boolean;713};714export type GuestAccountsSettings = {715 Enable: boolean;716 AllowEmailAccounts: boolean;717 EnforceMultifactorAuthentication: boolean;718 RestrictCreationToDomains: string;719};720export type ImageProxySettings = {721 Enable: boolean;722 ImageProxyType: string;723 RemoteImageProxyURL: string;724 RemoteImageProxyOptions: string;725};726export type FeatureFlags = Record<string, string>;727export type AdminConfig = {728 ServiceSettings: ServiceSettings;729 TeamSettings: TeamSettings;730 ClientRequirements: ClientRequirements;731 SqlSettings: SqlSettings;732 LogSettings: LogSettings;733 ExperimentalAuditSettings: ExperimentalAuditSettings;734 NotificationLogSettings: NotificationLogSettings;735 PasswordSettings: PasswordSettings;736 FileSettings: FileSettings;737 EmailSettings: EmailSettings;738 RateLimitSettings: RateLimitSettings;739 PrivacySettings: PrivacySettings;740 SupportSettings: SupportSettings;741 AnnouncementSettings: AnnouncementSettings;742 ThemeSettings: ThemeSettings;743 GitLabSettings: SSOSettings;744 GoogleSettings: SSOSettings;745 Office365Settings: Office365Settings;746 OpenIdSettings: SSOSettings;747 LdapSettings: LdapSettings;748 ComplianceSettings: ComplianceSettings;749 LocalizationSettings: LocalizationSettings;750 SamlSettings: SamlSettings;751 NativeAppSettings: NativeAppSettings;752 ClusterSettings: ClusterSettings;753 MetricsSettings: MetricsSettings;754 ExperimentalSettings: ExperimentalSettings;755 AnalyticsSettings: AnalyticsSettings;756 ElasticsearchSettings: ElasticsearchSettings;757 BleveSettings: BleveSettings;758 DataRetentionSettings: DataRetentionSettings;759 MessageExportSettings: MessageExportSettings;760 JobSettings: JobSettings;761 PluginSettings: PluginSettings;762 DisplaySettings: DisplaySettings;763 GuestAccountsSettings: GuestAccountsSettings;764 ImageProxySettings: ImageProxySettings;765 FeatureFlags: FeatureFlags;766};767export type EnvironmentConfigSettings<T> = {768 [P in keyof T]: boolean;769}770export type EnvironmentConfig = {771 [P in keyof AdminConfig]: EnvironmentConfigSettings<AdminConfig[P]>;772}773export type WarnMetricStatus = {774 id: string;775 limit: number;776 acked: boolean;777 store_status: string;...

Full Screen

Full Screen

webpack_v4.x.x.js

Source:webpack_v4.x.x.js Github

copy

Full Screen

1// flow-typed signature: a11323c6900f44e506402540d33781c22// flow-typed version: 7448070196/webpack_v4.x.x/flow_>=v0.104.x3import * as http from 'http';4import fs from 'fs';5declare module 'webpack' {6 declare class $WebpackError extends Error {7 constructor(message: string): WebpackError;8 inspect(): string;9 details: string;10 }11 declare type WebpackError = $WebpackError;12 declare interface Stats {13 hasErrors(): boolean;14 hasWarnings(): boolean;15 toJson(options?: StatsOptions): any;16 toString(options?: { ...StatsOptions, colors?: boolean, ... }): string;17 }18 declare type Callback = (error: WebpackError, stats: Stats) => void;19 declare type WatchHandler = (error: WebpackError, stats: Stats) => void;20 declare type Watching = {21 close(): void,22 invalidate(): void,23 ...24 };25 declare type WebpackCompiler = {26 run(callback: Callback): void,27 watch(options: WatchOptions, handler: WatchHandler): Watching,28 ...29 };30 declare type WebpackMultiCompiler = {31 run(callback: Callback): void,32 watch(options: WatchOptions, handler: WatchHandler): Watching,33 ...34 };35 declare class WebpackCompilation {36 constructor(compiler: WebpackCompiler): WebpackCompilation;37 // <...>38 }39 declare class WebpackStats {40 constructor(compilation: WebpackCompilation): WebpackStats;41 // <...>42 }43 declare type NonEmptyArrayOfUniqueStringValues = Array<string>;44 declare type EntryObject = { [k: string]: string | NonEmptyArrayOfUniqueStringValues, ... };45 declare type EntryItem = string | NonEmptyArrayOfUniqueStringValues;46 declare type EntryStatic = EntryObject | EntryItem;47 declare type EntryDynamic = () => EntryStatic | Promise<EntryStatic>;48 declare type Entry = EntryDynamic | EntryStatic;49 declare type ArrayOfStringValues = Array<string>;50 declare type ExternalItem =51 | string52 | { [k: string]:53 | string54 | { [k: string]: any, ... }55 | ArrayOfStringValues56 | boolean, ... }57 | RegExp;58 declare type Externals =59 | ((60 context: string,61 request: string,62 callback: (err?: Error, result?: string) => void63 ) => void)64 | ExternalItem65 | Array<66 | ((67 context: string,68 request: string,69 callback: (err?: Error, result?: string) => void70 ) => void)71 | ExternalItem72 >;73 declare type RuleSetCondition =74 | RegExp75 | string76 | ((value: string) => boolean)77 | RuleSetConditions78 | {79 and?: RuleSetConditions,80 exclude?: RuleSetConditionOrConditions,81 include?: RuleSetConditionOrConditions,82 not?: RuleSetConditions,83 or?: RuleSetConditions,84 test?: RuleSetConditionOrConditions,85 ...86 };87 declare type RuleSetConditions = Array<RuleSetCondition>;88 declare type RuleSetConditionOrConditions =89 | RuleSetCondition90 | RuleSetConditions;91 declare type RuleSetLoader = string;92 declare type RuleSetQuery = { [k: string]: any, ... } | string;93 declare type RuleSetUseItem =94 | RuleSetLoader95 | Function96 | {97 ident?: string,98 loader?: RuleSetLoader,99 options?: RuleSetQuery,100 query?: RuleSetQuery,101 ...102 };103 declare type RuleSetUse = RuleSetUseItem | Function | Array<RuleSetUseItem>;104 declare type RuleSetRule = {105 compiler?: RuleSetConditionOrConditions,106 enforce?: 'pre' | 'post',107 exclude?: RuleSetConditionOrConditions,108 include?: RuleSetConditionOrConditions,109 issuer?: RuleSetConditionOrConditions,110 loader?: RuleSetLoader | RuleSetUse,111 loaders?: RuleSetUse,112 oneOf?: RuleSetRules,113 options?: RuleSetQuery,114 parser?: { [k: string]: any, ... },115 query?: RuleSetQuery,116 resolve?: ResolveOptions,117 resource?: RuleSetConditionOrConditions,118 resourceQuery?: RuleSetConditionOrConditions,119 rules?: RuleSetRules,120 sideEffects?: boolean,121 test?: RuleSetConditionOrConditions,122 type?:123 | 'javascript/auto'124 | 'javascript/dynamic'125 | 'javascript/esm'126 | 'json'127 | 'webassembly/experimental',128 use?: RuleSetUse,129 ...130 };131 declare type RuleSetRules = Array<RuleSetRule>;132 declare type ModuleOptions = {133 defaultRules?: RuleSetRules,134 exprContextCritical?: boolean,135 exprContextRecursive?: boolean,136 exprContextRegExp?: boolean | RegExp,137 exprContextRequest?: string,138 noParse?: Array<RegExp> | RegExp | Function | Array<string> | string,139 rules?: RuleSetRules,140 strictExportPresence?: boolean,141 strictThisContextOnImports?: boolean,142 unknownContextCritical?: boolean,143 unknownContextRecursive?: boolean,144 unknownContextRegExp?: boolean | RegExp,145 unknownContextRequest?: string,146 unsafeCache?: boolean | Function,147 wrappedContextCritical?: boolean,148 wrappedContextRecursive?: boolean,149 wrappedContextRegExp?: RegExp,150 ...151 };152 declare type NodeOptions = {153 [k: string]: false | true | 'mock' | 'empty',154 Buffer?: false | true | 'mock',155 __dirname?: false | true | 'mock',156 __filename?: false | true | 'mock',157 console?: false | true | 'mock',158 global?: boolean,159 process?: false | true | 'mock',160 ...161 };162 declare type WebpackPluginFunction = (compiler: WebpackCompiler) => void;163 declare type WebpackPluginInstance = {164 [k: string]: any,165 apply: WebpackPluginFunction,166 ...167 };168 declare type OptimizationSplitChunksOptions = {169 automaticNameDelimiter?: string,170 cacheGroups?: { [k: string]:171 | false172 | Function173 | string174 | RegExp175 | {176 automaticNameDelimiter?: string,177 automaticNamePrefix?: string,178 chunks?: ('initial' | 'async' | 'all') | Function,179 enforce?: boolean,180 filename?: string,181 maxAsyncRequests?: number,182 maxInitialRequests?: number,183 maxSize?: number,184 minChunks?: number,185 minSize?: number,186 name?: boolean | Function | string,187 priority?: number,188 reuseExistingChunk?: boolean,189 test?: Function | string | RegExp,190 ...191 }, ... },192 chunks?: ('initial' | 'async' | 'all') | Function,193 fallbackCacheGroup?: {194 automaticNameDelimiter?: string,195 maxSize?: number,196 minSize?: number,197 ...198 },199 filename?: string,200 hidePathInfo?: boolean,201 maxAsyncRequests?: number,202 maxInitialRequests?: number,203 maxSize?: number,204 minChunks?: number,205 minSize?: number,206 name?: boolean | Function | string,207 ...208 };209 declare type OptimizationOptions = {210 checkWasmTypes?: boolean,211 chunkIds?: 'natural' | 'named' | 'size' | 'total-size' | false,212 concatenateModules?: boolean,213 flagIncludedChunks?: boolean,214 hashedModuleIds?: boolean,215 mangleWasmImports?: boolean,216 mergeDuplicateChunks?: boolean,217 minimize?: boolean,218 minimizer?: Array<WebpackPluginInstance | WebpackPluginFunction>,219 moduleIds?: 'natural' | 'named' | 'hashed' | 'size' | 'total-size' | false,220 namedChunks?: boolean,221 namedModules?: boolean,222 noEmitOnErrors?: boolean,223 nodeEnv?: false | string,224 occurrenceOrder?: boolean,225 portableRecords?: boolean,226 providedExports?: boolean,227 removeAvailableModules?: boolean,228 removeEmptyChunks?: boolean,229 runtimeChunk?:230 | boolean231 | ('single' | 'multiple')232 | { name?: string | Function, ... },233 sideEffects?: boolean,234 splitChunks?: false | OptimizationSplitChunksOptions,235 usedExports?: boolean,236 ...237 };238 declare type LibraryCustomUmdObject = {239 amd?: string,240 commonjs?: string,241 root?: string | ArrayOfStringValues,242 ...243 };244 declare type OutputOptions = {245 auxiliaryComment?:246 | string247 | {248 amd?: string,249 commonjs?: string,250 commonjs2?: string,251 root?: string,252 ...253 },254 chunkCallbackName?: string,255 chunkFilename?: string,256 chunkLoadTimeout?: number,257 crossOriginLoading?: false | 'anonymous' | 'use-credentials',258 devtoolFallbackModuleFilenameTemplate?: string | Function,259 devtoolLineToLine?: boolean | { [k: string]: any, ... },260 devtoolModuleFilenameTemplate?: string | Function,261 devtoolNamespace?: string,262 filename?: string | Function,263 globalObject?: string,264 hashDigest?: string,265 hashDigestLength?: number,266 hashFunction?: string | Function,267 hashSalt?: string,268 hotUpdateChunkFilename?: string | Function,269 hotUpdateFunction?: string,270 hotUpdateMainFilename?: string | Function,271 jsonpFunction?: string,272 jsonpScriptType?: false | 'text/javascript' | 'module',273 library?: string | Array<string> | LibraryCustomUmdObject,274 libraryExport?: string | ArrayOfStringValues,275 libraryTarget?:276 | 'var'277 | 'assign'278 | 'this'279 | 'window'280 | 'self'281 | 'global'282 | 'commonjs'283 | 'commonjs2'284 | 'commonjs-module'285 | 'amd'286 | 'amd-require'287 | 'umd'288 | 'umd2'289 | 'jsonp',290 path?: string,291 pathinfo?: boolean,292 publicPath?: string | Function,293 sourceMapFilename?: string,294 sourcePrefix?: string,295 strictModuleExceptionHandling?: boolean,296 umdNamedDefine?: boolean,297 webassemblyModuleFilename?: string,298 ...299 };300 declare type PerformanceOptions = {301 assetFilter?: Function,302 hints?: false | 'warning' | 'error',303 maxAssetSize?: number,304 maxEntrypointSize?: number,305 ...306 };307 declare type ArrayOfStringOrStringArrayValues = Array<string | Array<string>>;308 declare type ResolveOptions = {309 alias?:310 | { [k: string]: string, ... }311 | Array<{312 alias?: string,313 name?: string,314 onlyModule?: boolean,315 ...316 }>,317 aliasFields?: ArrayOfStringOrStringArrayValues,318 cachePredicate?: Function,319 cacheWithContext?: boolean,320 concord?: boolean,321 descriptionFiles?: ArrayOfStringValues,322 enforceExtension?: boolean,323 enforceModuleExtension?: boolean,324 extensions?: ArrayOfStringValues,325 fileSystem?: { [k: string]: any, ... },326 mainFields?: ArrayOfStringOrStringArrayValues,327 mainFiles?: ArrayOfStringValues,328 moduleExtensions?: ArrayOfStringValues,329 modules?: ArrayOfStringValues,330 plugins?: Array<WebpackPluginInstance | WebpackPluginFunction>,331 resolver?: { [k: string]: any, ... },332 symlinks?: boolean,333 unsafeCache?: boolean | { [k: string]: any, ... },334 useSyncFileSystemCalls?: boolean,335 ...336 };337 declare type FilterItemTypes = RegExp | string | Function;338 declare type FilterTypes = FilterItemTypes | Array<FilterItemTypes>;339 declare type StatsOptions =340 | boolean341 | ('none' | 'errors-only' | 'minimal' | 'normal' | 'detailed' | 'verbose')342 | {343 all?: boolean,344 assets?: boolean,345 assetsSort?: string,346 builtAt?: boolean,347 cached?: boolean,348 cachedAssets?: boolean,349 children?: boolean,350 chunkGroups?: boolean,351 chunkModules?: boolean,352 chunkOrigins?: boolean,353 chunks?: boolean,354 chunksSort?: string,355 colors?:356 | boolean357 | {358 bold?: string,359 cyan?: string,360 green?: string,361 magenta?: string,362 red?: string,363 yellow?: string,364 ...365 },366 context?: string,367 depth?: boolean,368 entrypoints?: boolean,369 env?: boolean,370 errorDetails?: boolean,371 errors?: boolean,372 exclude?: FilterTypes | boolean,373 excludeAssets?: FilterTypes,374 excludeModules?: FilterTypes | boolean,375 hash?: boolean,376 maxModules?: number,377 moduleAssets?: boolean,378 moduleTrace?: boolean,379 modules?: boolean,380 modulesSort?: string,381 nestedModules?: boolean,382 optimizationBailout?: boolean,383 outputPath?: boolean,384 performance?: boolean,385 providedExports?: boolean,386 publicPath?: boolean,387 reasons?: boolean,388 source?: boolean,389 timings?: boolean,390 usedExports?: boolean,391 version?: boolean,392 warnings?: boolean,393 warningsFilter?: FilterTypes,394 ...395 };396 declare type WatchOptions = {397 aggregateTimeout?: number,398 ignored?: { [k: string]: any, ... },399 poll?: boolean | number,400 stdin?: boolean,401 ...402 };403 declare type WebpackOptions = {404 amd?: { [k: string]: any, ... },405 bail?: boolean,406 cache?: boolean | { [k: string]: any, ... },407 context?: string,408 dependencies?: Array<string>,409 devServer?: {410 after?: (app: any, server: http.Server) => void,411 allowedHosts?: string[],412 before?: (app: any, server: http.Server) => void,413 bonjour?: boolean,414 clientLogLevel?: 'none' | 'info' | 'error' | 'warning',415 compress?: boolean,416 contentBase?: false | string | string[] | number,417 disableHostCheck?: boolean,418 filename?: string,419 headers?: { [key: string]: string, ... },420 historyApiFallback?:421 | boolean422 | {423 rewrites?: Array<{424 from: string,425 to: string,426 ...427 }>,428 disableDotRule?: boolean,429 ...430 },431 host?: string,432 hot?: boolean,433 hotOnly?: boolean,434 https?:435 | boolean436 | {437 key: string,438 cert: string,439 ca?: string,440 ...441 },442 index?: string,443 inline?: boolean,444 lazy?: boolean,445 noInfo?: boolean,446 open?: boolean | string,447 openPage?: string,448 overlay?:449 | boolean450 | {451 errors?: boolean,452 warnings?: boolean,453 ...454 },455 pfx?: string,456 pfxPassphrase?: string,457 port?: number,458 proxy?: Object | Array<Object | Function>,459 public?: string,460 publicPath?: string,461 quiet?: boolean,462 socket?: string,463 staticOptions?: {464 dotfiles?: string,465 etag?: boolean,466 extensions?: false | string[],467 fallthrough?: boolean,468 immutable?: boolean,469 index?: false | string,470 lastModified?: boolean,471 maxAge?: number,472 redirect?: boolean,473 setHeaders?: (474 res: http.OutgoingMessage,475 path: string,476 stat: fs.Stat477 ) => void,478 ...479 },480 stats?: StatsOptions,481 useLocalIp?: boolean,482 watchContentBase?: boolean,483 watchOptions?: WatchOptions,484 publicPath?: string,485 ...486 },487 devtool?:488 | '@cheap-eval-source-map'489 | '@cheap-module-eval-source-map'490 | '@cheap-module-source-map'491 | '@cheap-source-map'492 | '@eval-source-map'493 | '@eval'494 | '@hidden-source-map'495 | '@inline-source-map'496 | '@nosources-source-map'497 | '@source-map'498 | '#@cheap-eval-source-map'499 | '#@cheap-module-eval-source-map'500 | '#@cheap-module-source-map'501 | '#@cheap-source-map'502 | '#@eval-source-map'503 | '#@eval'504 | '#@hidden-source-map'505 | '#@inline-source-map'506 | '#@nosources-source-map'507 | '#@source-map'508 | '#cheap-eval-source-map'509 | '#cheap-module-eval-source-map'510 | '#cheap-module-source-map'511 | '#cheap-source-map'512 | '#eval-source-map'513 | '#eval'514 | '#hidden-source-map'515 | '#inline-source-map'516 | '#nosources-source-map'517 | '#source-map'518 | 'cheap-eval-source-map'519 | 'cheap-module-eval-source-map'520 | 'cheap-module-source-map'521 | 'cheap-source-map'522 | 'eval-source-map'523 | 'eval'524 | 'hidden-source-map'525 | 'inline-source-map'526 | 'nosources-source-map'527 | 'source-map'528 | false,529 entry?: Entry,530 externals?: Externals,531 loader?: { [k: string]: any, ... },532 mode?: 'development' | 'production' | 'none',533 module?: ModuleOptions,534 name?: string,535 node?: false | NodeOptions,536 optimization?: OptimizationOptions,537 output?: OutputOptions,538 parallelism?: number,539 performance?: false | PerformanceOptions,540 plugins?: Array<WebpackPluginInstance | WebpackPluginFunction>,541 profile?: boolean,542 recordsInputPath?: string,543 recordsOutputPath?: string,544 recordsPath?: string,545 resolve?: ResolveOptions,546 resolveLoader?: ResolveOptions,547 serve?: { [k: string]: any, ... },548 stats?: StatsOptions,549 target?:550 | 'web'551 | 'webworker'552 | 'node'553 | 'async-node'554 | 'node-webkit'555 | 'electron-main'556 | 'electron-renderer'557 | ((compiler: WebpackCompiler) => void),558 watch?: boolean,559 watchOptions?: WatchOptions,560 ...561 };562 declare class EnvironmentPlugin {563 constructor(env: { [string]: mixed, ... } | string[]): $ElementType<564 $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,565 number566 >;567 }568 declare class DefinePlugin {569 constructor({ [string]: string, ... }): $ElementType<570 $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,571 number572 >;573 }574 declare class IgnorePlugin {575 constructor(RegExp | {|576 resourceRegExp: RegExp,577 contextRegExp?: RegExp,578 |}, void | RegExp): $ElementType<579 $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,580 number581 >;582 }583 declare class SourceMapDevToolPlugin {584 constructor({|585 test?: ?(string | RegExp | Array<string | RegExp>),586 include?: ?(string | RegExp | Array<string | RegExp>),587 exclude?: ?(string | RegExp | Array<string | RegExp>),588 filename?: ?string,589 append?: ?(string | false),590 moduleFilenameTemplate?: ?string,591 fallbackModuleFilenameTemplate?: ?string,592 namespace?: ?string,593 module?: ?boolean,594 columns?: ?boolean,595 lineToLine?: ?(boolean | {|596 test?: ?(string | RegExp | Array<string | RegExp>),597 include?: ?(string | RegExp | Array<string | RegExp>),598 exclude?: ?(string | RegExp | Array<string | RegExp>),599 |}),600 noSources?: ?boolean,601 publicPath?: ?string,602 fileContext?: ?string,603 |}): $ElementType<604 $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,605 number606 >;607 }608 declare class HotModuleReplacementPlugin {609 constructor(): $ElementType<610 $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,611 number612 >;613 }614 declare class ContextReplacementPlugin {615 constructor(616 resourceRegExp: RegExp,617 newContentRegExp?: RegExp618 ): $ElementType<619 $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,620 number621 >;622 }623 declare function builder(624 options: WebpackOptions,625 callback?: Callback626 ): WebpackCompiler;627 declare function builder(628 options: WebpackOptions[],629 callback?: Callback630 ): WebpackMultiCompiler;631 declare module.exports: typeof builder & {632 EnvironmentPlugin: typeof EnvironmentPlugin,633 DefinePlugin: typeof DefinePlugin,634 IgnorePlugin: typeof IgnorePlugin,635 SourceMapDevToolPlugin: typeof SourceMapDevToolPlugin,636 HotModuleReplacementPlugin: typeof HotModuleReplacementPlugin,637 ContextReplacementPlugin: typeof ContextReplacementPlugin,638 ...639 };...

Full Screen

Full Screen

15.6.2.js

Source:15.6.2.js Github

copy

Full Screen

...21 */22/**23 File Name: 15.6.2.js24 ECMA Section: 15.6.2 The Boolean Constructor25 15.6.2.1 new Boolean( value )26 15.6.2.2 new Boolean()27 This test verifies that the Boolean constructor28 initializes a new object (typeof should return29 "object"). The prototype of the new object should30 be Boolean.prototype. The value of the object31 should be ToBoolean( value ) (a boolean value).32 Description:33 Author: christine@netscape.com34 Date: june 27, 199735*/36 var SECTION = "15.6.2";37 var VERSION = "ECMA_1";38 startTest();39 var TITLE = "15.6.2 The Boolean Constructor; 15.6.2.1 new Boolean( value ); 15.6.2.2 new Boolean()";40 writeHeaderToLog( SECTION + " "+ TITLE);41 var testcases = getTestCases();42 test();43function getTestCases() {44 var array = new Array();45 var item = 0;46 array[item++] = new TestCase( SECTION, "typeof (new Boolean(1))", "object", typeof (new Boolean(1)) );47 array[item++] = new TestCase( SECTION, "(new Boolean(1)).constructor", Boolean.prototype.constructor, (new Boolean(1)).constructor );48 array[item++] = new TestCase( SECTION,49 "TESTBOOL=new Boolean(1);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",50 "[object Boolean]",51 eval("TESTBOOL=new Boolean(1);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );52 array[item++] = new TestCase( SECTION, "(new Boolean(1)).valueOf()", true, (new Boolean(1)).valueOf() );53 array[item++] = new TestCase( SECTION, "typeof new Boolean(1)", "object", typeof new Boolean(1) );54 array[item++] = new TestCase( SECTION, "(new Boolean(0)).constructor", Boolean.prototype.constructor, (new Boolean(0)).constructor );55 array[item++] = new TestCase( SECTION,56 "TESTBOOL=new Boolean(0);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",57 "[object Boolean]",58 eval("TESTBOOL=new Boolean(0);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );59 array[item++] = new TestCase( SECTION, "(new Boolean(0)).valueOf()", false, (new Boolean(0)).valueOf() );60 array[item++] = new TestCase( SECTION, "typeof new Boolean(0)", "object", typeof new Boolean(0) );61 array[item++] = new TestCase( SECTION, "(new Boolean(-1)).constructor", Boolean.prototype.constructor, (new Boolean(-1)).constructor );62 array[item++] = new TestCase( SECTION,63 "TESTBOOL=new Boolean(-1);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",64 "[object Boolean]",65 eval("TESTBOOL=new Boolean(-1);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );66 array[item++] = new TestCase( SECTION, "(new Boolean(-1)).valueOf()", true, (new Boolean(-1)).valueOf() );67 array[item++] = new TestCase( SECTION, "typeof new Boolean(-1)", "object", typeof new Boolean(-1) );68 array[item++] = new TestCase( SECTION, "(new Boolean('1')).constructor", Boolean.prototype.constructor, (new Boolean('1')).constructor );69 array[item++] = new TestCase( SECTION,70 "TESTBOOL=new Boolean('1');TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",71 "[object Boolean]",72 eval("TESTBOOL=new Boolean('1');TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );73 array[item++] = new TestCase( SECTION, "(new Boolean('1')).valueOf()", true, (new Boolean('1')).valueOf() );74 array[item++] = new TestCase( SECTION, "typeof new Boolean('1')", "object", typeof new Boolean('1') );75 array[item++] = new TestCase( SECTION, "(new Boolean('0')).constructor", Boolean.prototype.constructor, (new Boolean('0')).constructor );76 array[item++] = new TestCase( SECTION,77 "TESTBOOL=new Boolean('0');TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",78 "[object Boolean]",79 eval("TESTBOOL=new Boolean('0');TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );80 array[item++] = new TestCase( SECTION, "(new Boolean('0')).valueOf()", true, (new Boolean('0')).valueOf() );81 array[item++] = new TestCase( SECTION, "typeof new Boolean('0')", "object", typeof new Boolean('0') );82 array[item++] = new TestCase( SECTION, "(new Boolean('-1')).constructor", Boolean.prototype.constructor, (new Boolean('-1')).constructor );83 array[item++] = new TestCase( SECTION,84 "TESTBOOL=new Boolean('-1');TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",85 "[object Boolean]",86 eval("TESTBOOL=new Boolean('-1');TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );87 array[item++] = new TestCase( SECTION, "(new Boolean('-1')).valueOf()", true, (new Boolean('-1')).valueOf() );88 array[item++] = new TestCase( SECTION, "typeof new Boolean('-1')", "object", typeof new Boolean('-1') );89 array[item++] = new TestCase( SECTION, "(new Boolean(new Boolean(true))).constructor", Boolean.prototype.constructor, (new Boolean(new Boolean(true))).constructor );90 array[item++] = new TestCase( SECTION,91 "TESTBOOL=new Boolean(new Boolean(true));TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",92 "[object Boolean]",93 eval("TESTBOOL=new Boolean(new Boolean(true));TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );94 array[item++] = new TestCase( SECTION, "(new Boolean(new Boolean(true))).valueOf()", true, (new Boolean(new Boolean(true))).valueOf() );95 array[item++] = new TestCase( SECTION, "typeof new Boolean(new Boolean(true))", "object", typeof new Boolean(new Boolean(true)) );96 array[item++] = new TestCase( SECTION, "(new Boolean(Number.NaN)).constructor", Boolean.prototype.constructor, (new Boolean(Number.NaN)).constructor );97 array[item++] = new TestCase( SECTION,98 "TESTBOOL=new Boolean(Number.NaN);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",99 "[object Boolean]",100 eval("TESTBOOL=new Boolean(Number.NaN);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );101 array[item++] = new TestCase( SECTION, "(new Boolean(Number.NaN)).valueOf()", false, (new Boolean(Number.NaN)).valueOf() );102 array[item++] = new TestCase( SECTION, "typeof new Boolean(Number.NaN)", "object", typeof new Boolean(Number.NaN) );103 array[item++] = new TestCase( SECTION, "(new Boolean(null)).constructor", Boolean.prototype.constructor, (new Boolean(null)).constructor );104 array[item++] = new TestCase( SECTION,105 "TESTBOOL=new Boolean(null);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",106 "[object Boolean]",107 eval("TESTBOOL=new Boolean(null);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );108 array[item++] = new TestCase( SECTION, "(new Boolean(null)).valueOf()", false, (new Boolean(null)).valueOf() );109 array[item++] = new TestCase( SECTION, "typeof new Boolean(null)", "object", typeof new Boolean(null) );110 array[item++] = new TestCase( SECTION, "(new Boolean(void 0)).constructor", Boolean.prototype.constructor, (new Boolean(void 0)).constructor );111 array[item++] = new TestCase( SECTION,112 "TESTBOOL=new Boolean(void 0);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",113 "[object Boolean]",114 eval("TESTBOOL=new Boolean(void 0);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );115 array[item++] = new TestCase( SECTION, "(new Boolean(void 0)).valueOf()", false, (new Boolean(void 0)).valueOf() );116 array[item++] = new TestCase( SECTION, "typeof new Boolean(void 0)", "object", typeof new Boolean(void 0) );117 array[item++] = new TestCase( SECTION, "(new Boolean(Number.POSITIVE_INFINITY)).constructor", Boolean.prototype.constructor, (new Boolean(Number.POSITIVE_INFINITY)).constructor );118 array[item++] = new TestCase( SECTION,119 "TESTBOOL=new Boolean(Number.POSITIVE_INFINITY);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",120 "[object Boolean]",121 eval("TESTBOOL=new Boolean(Number.POSITIVE_INFINITY);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );122 array[item++] = new TestCase( SECTION, "(new Boolean(Number.POSITIVE_INFINITY)).valueOf()", true, (new Boolean(Number.POSITIVE_INFINITY)).valueOf() );123 array[item++] = new TestCase( SECTION, "typeof new Boolean(Number.POSITIVE_INFINITY)", "object", typeof new Boolean(Number.POSITIVE_INFINITY) );124 array[item++] = new TestCase( SECTION, "(new Boolean(Number.NEGATIVE_INFINITY)).constructor", Boolean.prototype.constructor, (new Boolean(Number.NEGATIVE_INFINITY)).constructor );125 array[item++] = new TestCase( SECTION,126 "TESTBOOL=new Boolean(Number.NEGATIVE_INFINITY);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",127 "[object Boolean]",128 eval("TESTBOOL=new Boolean(Number.NEGATIVE_INFINITY);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );129 array[item++] = new TestCase( SECTION, "(new Boolean(Number.NEGATIVE_INFINITY)).valueOf()", true, (new Boolean(Number.NEGATIVE_INFINITY)).valueOf() );130 array[item++] = new TestCase( SECTION, "typeof new Boolean(Number.NEGATIVE_INFINITY)", "object", typeof new Boolean(Number.NEGATIVE_INFINITY) );131 array[item++] = new TestCase( SECTION, "(new Boolean(Number.NEGATIVE_INFINITY)).constructor", Boolean.prototype.constructor, (new Boolean(Number.NEGATIVE_INFINITY)).constructor );132 array[item++] = new TestCase( "15.6.2.2",133 "TESTBOOL=new Boolean();TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",134 "[object Boolean]",135 eval("TESTBOOL=new Boolean();TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );136 array[item++] = new TestCase( "15.6.2.2", "(new Boolean()).valueOf()", false, (new Boolean()).valueOf() );137 array[item++] = new TestCase( "15.6.2.2", "typeof new Boolean()", "object", typeof new Boolean() );138 return ( array );139}140function test() {141 for ( tc = 0; tc < testcases.length; tc++ ) {142 testcases[tc].passed = writeTestCaseResult(143 testcases[tc].expect,144 testcases[tc].actual,145 testcases[tc].description +" = "+ testcases[tc].actual );146 testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";147 }148 stopTest();149 return ( testcases );...

Full Screen

Full Screen

toBoolean.js

Source:toBoolean.js Github

copy

Full Screen

...4let value = "billi billi";5console.log(value);6console.log(typeof value);7// 1 способ конструктор Boolean8let toBoolean = Boolean(value);9console.log(`${value}, через конструктор Boolean(): `, toBoolean);10console.log(11 `тип данных ${value}, через конструктор Boolean(): `,12 typeof toBoolean13);14// 2 способ !!15toBoolean = !!value;16console.log(`${value}, через !! : `, toBoolean);17console.log(`тип данных ${value}, через !! : `, typeof toBoolean);18// ==========================19// === строчное число к булю ===20value = "1234";21console.log(value);22console.log(typeof value);23// 1 способ конструктор Boolean24toBoolean = Boolean(value);25console.log(`${value}, через конструктор Boolean(): `, toBoolean);26console.log(27 `тип данных ${value}, через конструктор Boolean(): `,28 typeof toBoolean29);30// 2 способ !!31toBoolean = !!value;32console.log(`${value}, через !! : `, toBoolean);33console.log(`тип данных ${value}, через !! : `, typeof toBoolean);34// ==========================35// === пустая строка к булю ===36value = "";37console.log(value);38console.log(typeof value);39// 1 способ конструктор Boolean40toBoolean = Boolean(value);41console.log(`пустая строка ${value}, через конструктор Boolean(): `, toBoolean);42console.log(43 `тип данных пустой строки ${value}, через конструктор Boolean(): `,44 typeof toBoolean45);46// 2 способ !!47toBoolean = !!value;48console.log(`пустая стррока ${value}, через !! : `, toBoolean);49console.log(`тип данных пустой строки ${value}, через !! : `, typeof toBoolean);50// ==========================51// === пустая строка с пробелом к булю ===52value = " ";53console.log(value);54console.log(typeof value);55// 1 способ конструктор Boolean56toBoolean = Boolean(value);57console.log(`пустая строка с пробелом ${value}, через конструктор Boolean(): `, toBoolean);58console.log(59 `тип данных пустой строки с пробелом ${value}, через конструктор Boolean(): `,60 typeof toBoolean61);62// 2 способ !!63toBoolean = !!value;64console.log(`пустая стррока с пробелом ${value}, через !! : `, toBoolean);65console.log(`тип данных пустой строки с пробелом ${value}, через !! : `, typeof toBoolean);66// ==========================67// === число к булю ===68value = 0;69console.log(value);70console.log(typeof value);71// 1 способ конструктор Boolean72toBoolean = Boolean(value);73console.log(`${value}, через конструктор Boolean(): `, toBoolean);74console.log(75 `тип данных ${value}, через конструктор Boolean(): `,76 typeof toBoolean77);78// 2 способ !!79toBoolean = !!value;80console.log(`${value}, через !! : `, toBoolean);81console.log(`тип данных ${value}, через !! : `, typeof toBoolean);82// ==========================83// === число к булю ===84value = 1;85console.log(value);86console.log(typeof value);87// 1 способ конструктор Boolean88toBoolean = Boolean(value);89console.log(`${value}, через конструктор Boolean(): `, toBoolean);90console.log(91 `тип данных ${value}, через конструктор Boolean(): `,92 typeof toBoolean93);94// 2 способ !!95toBoolean = !!value;96console.log(`${value}, через !! : `, toBoolean);97console.log(`тип данных ${value}, через !! : `, typeof toBoolean);98// ==========================99// === undefined к булю ===100value = undefined;101console.log(value);102console.log(typeof value);103// 1 способ конструктор Boolean104toBoolean = Boolean(value);105console.log(`${value}, через конструктор Boolean(): `, toBoolean);106console.log(107 `тип данных ${value}, через конструктор Boolean(): `,108 typeof toBoolean109);110// 2 способ !!111toBoolean = !!value;112console.log(`${value}, через !! : `, toBoolean);113console.log(`тип данных ${value}, через !! : `, typeof toBoolean);114// ==========================115// === null к булю ===116value = null;117console.log(value);118console.log(typeof value);119// 1 способ конструктор Boolean120toBoolean = Boolean(value);121console.log(`${value}, через конструктор Boolean(): `, toBoolean);122console.log(123 `тип данных ${value}, через конструктор Boolean(): `,124 typeof toBoolean125);126// 2 способ !!127toBoolean = !!value;128console.log(`${value}, через !! : `, toBoolean);129console.log(`тип данных ${value}, через !! : `, typeof toBoolean);130// ==========================131// === NaN к булю ===132value = NaN;133console.log(value);134console.log(typeof value);135// 1 способ конструктор Boolean136toBoolean = Boolean(value);137console.log(`${value}, через конструктор Boolean(): `, toBoolean);138console.log(139 `тип данных ${value}, через конструктор Boolean(): `,140 typeof toBoolean141);142// 2 способ !!143toBoolean = !!value;144console.log(`${value}, через !! : `, toBoolean);145console.log(`тип данных ${value}, через !! : `, typeof toBoolean);146// ==========================147// === Infinity к булю ===148value = Infinity;149console.log(value);150console.log(typeof value);151// 1 способ конструктор Boolean152toBoolean = Boolean(value);153console.log(`${value}, через конструктор Boolean(): `, toBoolean);154console.log(155 `тип данных ${value}, через конструктор Boolean(): `,156 typeof toBoolean157);158// 2 способ !!159toBoolean = !!value;160console.log(`${value}, через !! : `, toBoolean);...

Full Screen

Full Screen

optiondict.py

Source:optiondict.py Github

copy

Full Screen

1#!/usr/bin/env python2"""3Copyright (c) 2006-2021 sqlmap developers (https://sqlmap.org/)4See the file 'LICENSE' for copying permission5"""6optDict = {7 # Family: {"parameter name": "parameter datatype"},8 # --OR--9 # Family: {"parameter name": ("parameter datatype", "category name used for common outputs feature")},10 "Target": {11 "direct": "string",12 "url": "string",13 "logFile": "string",14 "bulkFile": "string",15 "requestFile": "string",16 "sessionFile": "string",17 "googleDork": "string",18 "configFile": "string",19 },20 "Request": {21 "method": "string",22 "data": "string",23 "paramDel": "string",24 "cookie": "string",25 "cookieDel": "string",26 "liveCookies": "string",27 "loadCookies": "string",28 "dropSetCookie": "boolean",29 "agent": "string",30 "mobile": "boolean",31 "randomAgent": "boolean",32 "host": "string",33 "referer": "string",34 "headers": "string",35 "authType": "string",36 "authCred": "string",37 "authFile": "string",38 "ignoreCode": "string",39 "ignoreProxy": "boolean",40 "ignoreRedirects": "boolean",41 "ignoreTimeouts": "boolean",42 "proxy": "string",43 "proxyCred": "string",44 "proxyFile": "string",45 "proxyFreq": "integer",46 "tor": "boolean",47 "torPort": "integer",48 "torType": "string",49 "checkTor": "boolean",50 "delay": "float",51 "timeout": "float",52 "retries": "integer",53 "rParam": "string",54 "safeUrl": "string",55 "safePost": "string",56 "safeReqFile": "string",57 "safeFreq": "integer",58 "skipUrlEncode": "boolean",59 "csrfToken": "string",60 "csrfUrl": "string",61 "csrfMethod": "string",62 "csrfRetries": "integer",63 "forceSSL": "boolean",64 "chunked": "boolean",65 "hpp": "boolean",66 "evalCode": "string",67 },68 "Optimization": {69 "optimize": "boolean",70 "predictOutput": "boolean",71 "keepAlive": "boolean",72 "nullConnection": "boolean",73 "threads": "integer",74 },75 "Injection": {76 "testParameter": "string",77 "skip": "string",78 "skipStatic": "boolean",79 "paramExclude": "string",80 "paramFilter": "string",81 "dbms": "string",82 "dbmsCred": "string",83 "os": "string",84 "invalidBignum": "boolean",85 "invalidLogical": "boolean",86 "invalidString": "boolean",87 "noCast": "boolean",88 "noEscape": "boolean",89 "prefix": "string",90 "suffix": "string",91 "tamper": "string",92 },93 "Detection": {94 "level": "integer",95 "risk": "integer",96 "string": "string",97 "notString": "string",98 "regexp": "string",99 "code": "integer",100 "smart": "boolean",101 "textOnly": "boolean",102 "titles": "boolean",103 },104 "Techniques": {105 "technique": "string",106 "timeSec": "integer",107 "uCols": "string",108 "uChar": "string",109 "uFrom": "string",110 "dnsDomain": "string",111 "secondUrl": "string",112 "secondReq": "string",113 },114 "Fingerprint": {115 "extensiveFp": "boolean",116 },117 "Enumeration": {118 "getAll": "boolean",119 "getBanner": ("boolean", "Banners"),120 "getCurrentUser": ("boolean", "Users"),121 "getCurrentDb": ("boolean", "Databases"),122 "getHostname": "boolean",123 "isDba": "boolean",124 "getUsers": ("boolean", "Users"),125 "getPasswordHashes": ("boolean", "Passwords"),126 "getPrivileges": ("boolean", "Privileges"),127 "getRoles": ("boolean", "Roles"),128 "getDbs": ("boolean", "Databases"),129 "getTables": ("boolean", "Tables"),130 "getColumns": ("boolean", "Columns"),131 "getSchema": "boolean",132 "getCount": "boolean",133 "dumpTable": "boolean",134 "dumpAll": "boolean",135 "search": "boolean",136 "getComments": "boolean",137 "getStatements": "boolean",138 "db": "string",139 "tbl": "string",140 "col": "string",141 "exclude": "string",142 "pivotColumn": "string",143 "dumpWhere": "string",144 "user": "string",145 "excludeSysDbs": "boolean",146 "limitStart": "integer",147 "limitStop": "integer",148 "firstChar": "integer",149 "lastChar": "integer",150 "sqlQuery": "string",151 "sqlShell": "boolean",152 "sqlFile": "string",153 },154 "Brute": {155 "commonTables": "boolean",156 "commonColumns": "boolean",157 "commonFiles": "boolean",158 },159 "User-defined function": {160 "udfInject": "boolean",161 "shLib": "string",162 },163 "File system": {164 "fileRead": "string",165 "fileWrite": "string",166 "fileDest": "string",167 },168 "Takeover": {169 "osCmd": "string",170 "osShell": "boolean",171 "osPwn": "boolean",172 "osSmb": "boolean",173 "osBof": "boolean",174 "privEsc": "boolean",175 "msfPath": "string",176 "tmpPath": "string",177 },178 "Windows": {179 "regRead": "boolean",180 "regAdd": "boolean",181 "regDel": "boolean",182 "regKey": "string",183 "regVal": "string",184 "regData": "string",185 "regType": "string",186 },187 "General": {188 "trafficFile": "string",189 "answers": "string",190 "batch": "boolean",191 "base64Parameter": "string",192 "base64Safe": "boolean",193 "binaryFields": "string",194 "charset": "string",195 "checkInternet": "boolean",196 "cleanup": "boolean",197 "crawlDepth": "integer",198 "crawlExclude": "string",199 "csvDel": "string",200 "dumpFormat": "string",201 "encoding": "string",202 "eta": "boolean",203 "flushSession": "boolean",204 "forms": "boolean",205 "freshQueries": "boolean",206 "googlePage": "integer",207 "harFile": "string",208 "hexConvert": "boolean",209 "outputDir": "string",210 "parseErrors": "boolean",211 "postprocess": "string",212 "preprocess": "string",213 "repair": "boolean",214 "saveConfig": "string",215 "scope": "string",216 "skipHeuristics": "boolean",217 "skipWaf": "boolean",218 "testFilter": "string",219 "testSkip": "string",220 "webRoot": "string",221 },222 "Miscellaneous": {223 "alert": "string",224 "beep": "boolean",225 "dependencies": "boolean",226 "disableColoring": "boolean",227 "listTampers": "boolean",228 "offline": "boolean",229 "purge": "boolean",230 "resultsFile": "string",231 "tmpDir": "string",232 "unstable": "boolean",233 "updateAll": "boolean",234 "wizard": "boolean",235 "verbose": "integer",236 },237 "Hidden": {238 "dummy": "boolean",239 "disablePrecon": "boolean",240 "profile": "boolean",241 "forceDns": "boolean",242 "murphyRate": "integer",243 "smokeTest": "boolean",244 },245 "API": {246 "api": "boolean",247 "taskid": "string",248 "database": "string",249 }...

Full Screen

Full Screen

9.2.js

Source:9.2.js Github

copy

Full Screen

...41 var TITLE = "ToBoolean";42 writeHeaderToLog( SECTION + " "+ TITLE);43 var testcases = new Array();44 // special cases here45 testcases[tc++] = new TestCase( SECTION, "Boolean()", false, Boolean() );46 testcases[tc++] = new TestCase( SECTION, "Boolean(var x)", false, Boolean(eval("var x")) );47 testcases[tc++] = new TestCase( SECTION, "Boolean(void 0)", false, Boolean(void 0) );48 testcases[tc++] = new TestCase( SECTION, "Boolean(null)", false, Boolean(null) );49 testcases[tc++] = new TestCase( SECTION, "Boolean(false)", false, Boolean(false) );50 testcases[tc++] = new TestCase( SECTION, "Boolean(true)", true, Boolean(true) );51 testcases[tc++] = new TestCase( SECTION, "Boolean(0)", false, Boolean(0) );52 testcases[tc++] = new TestCase( SECTION, "Boolean(-0)", false, Boolean(-0) );53 testcases[tc++] = new TestCase( SECTION, "Boolean(NaN)", false, Boolean(Number.NaN) );54 testcases[tc++] = new TestCase( SECTION, "Boolean('')", false, Boolean("") );55 // normal test cases here56 testcases[tc++] = new TestCase( SECTION, "Boolean(Infinity)", true, Boolean(Number.POSITIVE_INFINITY) );57 testcases[tc++] = new TestCase( SECTION, "Boolean(-Infinity)", true, Boolean(Number.NEGATIVE_INFINITY) );58 testcases[tc++] = new TestCase( SECTION, "Boolean(Math.PI)", true, Boolean(Math.PI) );59 testcases[tc++] = new TestCase( SECTION, "Boolean(1)", true, Boolean(1) );60 testcases[tc++] = new TestCase( SECTION, "Boolean(-1)", true, Boolean(-1) );61 testcases[tc++] = new TestCase( SECTION, "Boolean([tab])", true, Boolean("\t") );62 testcases[tc++] = new TestCase( SECTION, "Boolean('0')", true, Boolean("0") );63 testcases[tc++] = new TestCase( SECTION, "Boolean('string')", true, Boolean("string") );64 // ToBoolean (object) should always return true.65 testcases[tc++] = new TestCase( SECTION, "Boolean(new String() )", true, Boolean(new String()) );66 testcases[tc++] = new TestCase( SECTION, "Boolean(new String('') )", true, Boolean(new String("")) );67 testcases[tc++] = new TestCase( SECTION, "Boolean(new Boolean(true))", true, Boolean(new Boolean(true)) );68 testcases[tc++] = new TestCase( SECTION, "Boolean(new Boolean(false))", true, Boolean(new Boolean(false)) );69 testcases[tc++] = new TestCase( SECTION, "Boolean(new Boolean() )", true, Boolean(new Boolean()) );70 testcases[tc++] = new TestCase( SECTION, "Boolean(new Array())", true, Boolean(new Array()) );71 testcases[tc++] = new TestCase( SECTION, "Boolean(new Number())", true, Boolean(new Number()) );72 testcases[tc++] = new TestCase( SECTION, "Boolean(new Number(-0))", true, Boolean(new Number(-0)) );73 testcases[tc++] = new TestCase( SECTION, "Boolean(new Number(0))", true, Boolean(new Number(0)) );74 testcases[tc++] = new TestCase( SECTION, "Boolean(new Number(NaN))", true, Boolean(new Number(Number.NaN)) );75 testcases[tc++] = new TestCase( SECTION, "Boolean(new Number(-1))", true, Boolean(new Number(-1)) );76 testcases[tc++] = new TestCase( SECTION, "Boolean(new Number(Infinity))", true, Boolean(new Number(Number.POSITIVE_INFINITY)) );77 testcases[tc++] = new TestCase( SECTION, "Boolean(new Number(-Infinity))",true, Boolean(new Number(Number.NEGATIVE_INFINITY)) );78 testcases[tc++] = new TestCase( SECTION, "Boolean(new Object())", true, Boolean(new Object()) );79 testcases[tc++] = new TestCase( SECTION, "Boolean(new Function())", true, Boolean(new Function()) );80 testcases[tc++] = new TestCase( SECTION, "Boolean(new Date())", true, Boolean(new Date()) );81 testcases[tc++] = new TestCase( SECTION, "Boolean(new Date(0))", true, Boolean(new Date(0)) );82 testcases[tc++] = new TestCase( SECTION, "Boolean(Math)", true, Boolean(Math) );83 test();84function test() {85 for ( tc=0; tc < testcases.length; tc++ ) {86 testcases[tc].passed = writeTestCaseResult(87 testcases[tc].expect,88 testcases[tc].actual,89 testcases[tc].description +" = "+90 testcases[tc].actual );91 testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";92 }93 stopTest();94 return ( testcases );...

Full Screen

Full Screen

Boolean.js

Source:Boolean.js Github

copy

Full Screen

1Clazz.load (["java.lang.Comparable", "java.io.Serializable"], "java.lang.Boolean", null, function () {2java.lang.Boolean = Boolean;3if (Clazz.supportsNativeObject) {4 for (var i = 0; i < Clazz.extendedObjectMethods.length; i++) {5 var p = Clazz.extendedObjectMethods[i];6 Boolean.prototype[p] = Clazz._O.prototype[p];7 }8}9Boolean.__CLASS_NAME__ = "Boolean";10Clazz.implementOf (Boolean, [java.io.Serializable, java.lang.Comparable]);11Boolean.equals = Clazz.innerFunctions.equals;12Boolean.getName = Clazz.innerFunctions.getName;13Boolean.serialVersionUID = Boolean.prototype.serialVersionUID = -3665804199014368530;14Clazz.makeConstructor (Boolean, 15function (value) {16this.valueOf = function () {17 return value;18};19}, "~B");20Clazz.makeConstructor (Boolean, 21function (s) {22this.valueOf = function () {23 return Boolean.toBoolean (s);24};25}, "~S");26Boolean.parseBoolean = Clazz.defineMethod (Boolean, "parseBoolean", 27function (s) {28return Boolean.toBoolean (s);29}, "~S");30Clazz.defineMethod (Boolean, "booleanValue", 31function () {32return this.value;33});34Boolean.$valueOf = Clazz.defineMethod (Boolean, "$valueOf", 35function (b) {36return (b ? Boolean.TRUE : Boolean.FALSE);37}, "~B");38Boolean.$valueOf = Clazz.defineMethod (Boolean, "$valueOf", 39function (s) {40return Boolean.toBoolean (s) ? Boolean.TRUE : Boolean.FALSE;41}, "~S");42Boolean.toString = Clazz.defineMethod (Boolean, "toString", 43function (b) {44return b ? "true" : "false";45}, "~B");46Clazz.defineMethod (Boolean, "toString", 47function () {48return this.valueOf () ? "true" : "false";49});50Clazz.overrideMethod(Boolean, "hashCode", 51function () {52return this.valueOf () ? 1231 : 1237;53});54Clazz.overrideMethod(Boolean, "equals", 55function (obj) {56if (Clazz.instanceOf (obj, Boolean)) {57return this.value == (obj).booleanValue ();58}return false;59}, "~O");60Boolean.getBoolean = Clazz.defineMethod (Boolean, "getBoolean", 61function (name) {62var result = false;63try {64result = Boolean.toBoolean (System.getProperty (name));65} catch (e) {66if (Clazz.instanceOf (e, IllegalArgumentException)) {67} else if (Clazz.instanceOf (e, NullPointerException)) {68} else {69throw e;70}71}72return result;73}, "~S");74Clazz.overrideMethod(Boolean, "compareTo", 75function (b) {76return (b.value == this.value ? 0 : (this.value ? 1 : -1));77}, "Boolean");78Boolean.toBoolean = Clazz.defineMethod (Boolean, "toBoolean", 79 function (name) {80return ((name != null) && name.equalsIgnoreCase ("true"));81}, "~S");82Boolean.TRUE = Boolean.prototype.TRUE = new Boolean (true);83Boolean.FALSE = Boolean.prototype.FALSE = new Boolean (false);84Boolean.TYPE = Boolean.prototype.TYPE = Boolean;...

Full Screen

Full Screen

Set.py

Source:Set.py Github

copy

Full Screen

1Set DEFINITIONS IMPLICIT TAGS ::= 2BEGIN3IMPORTS Seq1 FROM SeqSetLib;4Set ::= SET 5{6 bool BOOLEAN,7 boolCon [20] BOOLEAN,8 boolPri [PRIVATE 21] BOOLEAN,9 boolApp [APPLICATION 22] BOOLEAN,10 boolExpCon [30] EXPLICIT BOOLEAN,11 boolExpPri [PRIVATE 31] EXPLICIT BOOLEAN,12 boolExpApp [APPLICATION 32] EXPLICIT BOOLEAN13}14Set1 ::= SET 15{16 bool1 BOOLEAN,17 int1 INTEGER,18 set1 SetIn19}20Set2 ::= SET 21{22 set2 SetIn,23 bool2 BOOLEAN,24 int2 INTEGER25}26Set3 ::= SET 27{28 bool3 BOOLEAN,29 set3 SetIn,30 int3 INTEGER31}32SetDef1 ::= SET 33{34 bool1 BOOLEAN DEFAULT TRUE,35 int1 INTEGER,36 set1 SetIn DEFAULT {}37}38SetDef2 ::= SET 39{40 set2 SetIn DEFAULT {},41 bool2 BOOLEAN,42 int2 INTEGER43}44SetDef3 ::= SET 45{46 bool3 BOOLEAN DEFAULT TRUE,47 set3 SetIn DEFAULT {},48 int3 INTEGER DEFAULT 1749}50SetOpt1 ::= SET 51{52 bool1 BOOLEAN OPTIONAL,53 int1 INTEGER,54 set1 SetIn OPTIONAL55}56SetOpt2 ::= SET 57{58 set2 SetIn OPTIONAL,59 bool2 BOOLEAN,60 int2 INTEGER61}62SetOpt3 ::= SET 63{64 bool3 BOOLEAN OPTIONAL,65 set3 SetIn OPTIONAL,66 int3 INTEGER OPTIONAL67}68SetIn ::= SET 69{70 boolIn BOOLEAN OPTIONAL,71 intIn INTEGER OPTIONAL72}73SetS1 ::= SET 74{75 boolS1 BOOLEAN,76 intS1 INTEGER,77 setS1 SET { boolIn BOOLEAN,78 intIn INTEGER }79}80SetS2 ::= SET 81{82 setS2 SET { boolIn BOOLEAN,83 intIn INTEGER },84 boolS2 BOOLEAN,85 intS2 INTEGER86}87SetS3 ::= SET 88{89 boolS3 BOOLEAN,90 setS3 SET { boolIn BOOLEAN,91 intIn INTEGER },92 intS3 INTEGER93}94SetImp1 ::= SET 95{96 seq Seq1,97 bool BOOLEAN,98 int INTEGER99}100SetImp2 ::= SET 101{102 bool BOOLEAN,103 seq Seq1,104 int INTEGER105}106SetImp3 ::= SET 107{108 bool BOOLEAN,109 int INTEGER,110 seq Seq1111}...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var expect = require('chai').expect;2var foo = 'bar';3var beverages = { tea: [ 'chai', 'matcha', 'oolong' ] };4expect(foo).to.be.a('string');5expect(foo).to.equal('bar');6expect(foo).to.have.lengthOf(3);7expect(beverages).to.have.property('tea').with.lengthOf(3);8var assert = require('chai').assert;9var foo = 'bar';10var beverages = { tea: [ 'chai', 'matcha', 'oolong' ] };11assert.equal(foo, 'bar', 'foo equal `bar`');12assert.lengthOf(foo, 3, 'foo`s value has a length of

Full Screen

Using AI Code Generation

copy

Full Screen

1const chai = require('chai');2describe('Boolean', function() {3 describe('Boolean()', function() {4 it('should return a boolean value', function() {5 expect(Boolean(0)).to.be.false;6 expect(Boolean(1)).to.be.true;7 expect(Boolean(-1)).to.be.true;8 expect(Boolean('')).to.be.false;9 expect(Boolean('0')).to.be.true;10 expect(Boolean('1')).to.be.true;11 expect(Boolean(' ')).to.be.true;12 expect(Boolean('foo')).to.be.true;13 expect(Boolean('true')).to.be.true;14 expect(Boolean('false')).to.be.true;15 expect(Boolean(null)).to.be.false;16 expect(Boolean(undefined)).to.be.false;17 expect(Boolean(NaN)).to.be.false;18 expect(Boolean({})).to.be.true;19 expect(Boolean([])).to.be.true;20 expect(Boolean(function() {})).to.be.true;21 });22 });23});24describe('Boolean', function() {25 describe('Boolean()', function() {26 it('should return a boolean value', function() {27 Boolean(0).should.be.false;28 Boolean(1).should.be.true;29 Boolean(-1).should.be.true;30 Boolean('').should.be.false;31 Boolean('0').should.be.true;32 Boolean('1').should.be.true;33 Boolean(' ').should.be.true;34 Boolean('foo').should.be.true;35 Boolean('true').should.be.true;36 Boolean('false').should.be.true;37 Boolean(null).should.be.false;38 Boolean(undefined).should.be.false;39 Boolean(NaN).should.be.false;40 Boolean({}).should.be.true;41 Boolean([]).should.be.true;42 Boolean(function() {}).should.be.true;43 });44 });45});46describe('Boolean', function() {47 describe('Boolean()', function() {48 it('should return a boolean

Full Screen

Using AI Code Generation

copy

Full Screen

1var chai = require('chai');2var expect = chai.expect;3describe('Boolean', function() {4 describe('#valueOf()', function() {5 it('should return false', function() {6 expect(false.valueOf()).to.be.false;7 });8 });9});10{11 "dependencies": {12 },13 "scripts": {14 }15}16var chai = require('chai');17var expect = chai.expect;18describe('Boolean', function() {19 describe('#valueOf()', function() {20 it('should return false', function() {21 expect(false.valueOf()).to.be.false;22 });23 });24});25{26 "dependencies": {27 },28 "scripts": {29 }30}31var chai = require('chai');32var expect = chai.expect;33describe('Boolean', function() {34 describe('#valueOf()', function() {35 it('should return false', function() {36 expect(false.valueOf()).to.be.false;37 });38 });39});40{41 "dependencies": {42 },43 "scripts": {44 }45}46var chai = require('chai');47var expect = chai.expect;48describe('Boolean', function() {49 describe('#valueOf()', function() {50 it('should return false', function() {51 expect(false.valueOf()).to.be.false;52 });53 });54});55{56 "dependencies": {57 },58 "scripts": {59 }60}

Full Screen

Using AI Code Generation

copy

Full Screen

1var chai = require('chai');2var expect = chai.expect;3var should = chai.should();4describe('Boolean', function() {5 describe('true', function() {6 it('should equal true', function() {7 expect(true).to.be.true;8 });9 });10});11var chai = require('chai');12var expect = chai.expect;13var should = chai.should();14describe('Boolean', function() {15 describe('true', function() {16 it('should equal true', function() {17 expect(true).to.be.true;18 });19 });20});21var chai = require('chai');22var expect = chai.expect;23var should = chai.should();24describe('Boolean', function() {25 describe('true', function() {26 it('should equal true', function() {27 expect(true).to.be.true;28 });29 });30});31var chai = require('chai');32var expect = chai.expect;33var should = chai.should();34describe('Boolean', function() {35 describe('true', function() {36 it('should equal true', function() {37 expect(true).to.be.true;38 });39 });40});41var chai = require('chai');42var expect = chai.expect;43var should = chai.should();44describe('Boolean', function() {45 describe('true', function() {46 it('should equal true', function() {47 expect(true).to.be.true;48 });49 });50});51var chai = require('chai');52var expect = chai.expect;53var should = chai.should();54describe('Boolean', function() {55 describe('true', function() {56 it('should equal true', function() {57 expect(true).to.be.true;58 });59 });60});61var chai = require('chai');62var expect = chai.expect;63var should = chai.should();64describe('Boolean', function() {65 describe('true', function() {66 it('should equal true', function() {67 expect(true).to.be.true;68 });69 });70});

Full Screen

Using AI Code Generation

copy

Full Screen

1const chai = require('chai');2const expect = chai.expect;3describe('Boolean', function() {4 describe('isTrue', function() {5 it('should return true', function() {6 expect(true).to.be.true;7 });8 });9});10describe('Boolean', function() {11 describe('isFalse', function() {12 it('should return false', function() {13 expect(false).to.be.false;14 });15 });16});17describe('Boolean', function() {18 describe('isNotTrue', function() {19 it('should return false', function() {20 expect(false).to.not.be.true;21 });22 });23});24describe('Boolean', function() {25 describe('isNotFalse', function() {26 it('should return true', function() {27 expect(true).to.not.be.false;28 });29 });30});31describe('Boolean', function() {32 describe('isNotTrue', function() {33 it('should return false', function() {34 expect(false).to.not.be.true;35 });36 });37});38describe('Boolean', function() {39 describe('isNotFalse', function() {40 it('should return true', function() {41 expect(true).to.not.be.false;42 });43 });44});45describe('Boolean', function() {46 describe('isNotTrue', function() {47 it('should return false', function() {48 expect(false).to.not.be.true;49 });50 });51});52describe('Boolean', function() {53 describe('isNotFalse', function() {54 it('should return true', function() {55 expect(true).to.not.be.false;56 });57 });58});

Full Screen

Using AI Code Generation

copy

Full Screen

1var a = new Boolean(false);2if (a && a.valueOf()) {3 console.log("hi");4}5var a = new Boolean(false);6if (a && a.valueOf()) {7 console.log("hi");8}9var a = new Boolean(false);10if (a && a.valueOf()) {11 console.log("hi");12}13var a = new Boolean(false);14if (a && a.valueOf()) {15 console.log("hi");16}17var a = new Boolean(false);18if (a && a.valueOf()) {19 console.log("hi");20}21var a = new Boolean(false);22if (a && a.valueOf()) {23 console.log("hi");24}25var a = new Boolean(false);26if (a && a.valueOf()) {27 console.log("hi");28}29var a = new Boolean(false);30if (a && a.valueOf()) {31 console.log("hi");32}33var a = new Boolean(false);34if (a && a.valueOf()) {35 console.log("hi");36}37var a = new Boolean(false);38if (a && a.valueOf()) {39 console.log("hi");40}41var a = new Boolean(false);42if (a && a.valueOf()) {43 console.log("hi");44}45var a = new Boolean(false);46if (a && a.valueOf()) {47 console.log("hi");48}

Full Screen

Using AI Code Generation

copy

Full Screen

1var chain = new Chain();2chain.addLink(new Link("A"));3chain.addLink(new Link("B"));4chain.addLink(new Link("C"));5var chain = new Chain();6chain.addLink(new Link("A"));7chain.addLink(new Link("B"));8chain.addLink(new Link("C"));9var chain = new Chain();10chain.addLink(new Link("A"));11chain.addLink(new Link("B"));12chain.addLink(new Link("C"));13var chain = new Chain();14chain.addLink(new Link("A"));15chain.addLink(new Link("B"));16chain.addLink(new Link("C"));17var chain = new Chain();18chain.addLink(new Link("A"));19chain.addLink(new Link("B"));20chain.addLink(new Link("C"));21var chain = new Chain();22chain.addLink(new Link("A"));23chain.addLink(new Link("B"));24chain.addLink(new Link("C"));25var chain = new Chain();26chain.addLink(new Link("A"));27chain.addLink(new Link("B"));28chain.addLink(new Link("C"));29var chain = new Chain();30chain.addLink(new Link("A"));31chain.addLink(new Link("B"));32chain.addLink(new Link("C"));33var chain = new Chain();34chain.addLink(new Link("A"));35chain.addLink(new Link("B"));36chain.addLink(new Link("C"));37chain.each(function(value, index){

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run chai automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful