[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: boundaries.ts
import * as Arr from "../../Array.js" import * as Chunk from "../../Chunk.js" import * as Equal from "../../Equal.js" import { pipe } from "../../Function.js" import * as Hash from "../../Hash.js" import type * as MetricBoundaries from "../../MetricBoundaries.js" import { pipeArguments } from "../../Pipeable.js" import { hasProperty } from "../../Predicate.js" /** @internal */ const MetricBoundariesSymbolKey = "effect/MetricBoundaries" /** @internal */ export const MetricBoundariesTypeId: MetricBoundaries.MetricBoundariesTypeId = Symbol.for( MetricBoundariesSymbolKey ) as MetricBoundaries.MetricBoundariesTypeId /** @internal */ class MetricBoundariesImpl implements MetricBoundaries.MetricBoundaries { readonly [MetricBoundariesTypeId]: MetricBoundaries.MetricBoundariesTypeId = MetricBoundariesTypeId constructor(readonly values: ReadonlyArray<number>) { this._hash = pipe( Hash.string(MetricBoundariesSymbolKey), Hash.combine(Hash.array(this.values)) ) } readonly _hash: number; [Hash.symbol](): number { return this._hash } [Equal.symbol](u: unknown): boolean { return isMetricBoundaries(u) && Equal.equals(this.values, u.values) } pipe() { return pipeArguments(this, arguments) } } /** @internal */ export const isMetricBoundaries = (u: unknown): u is MetricBoundaries.MetricBoundaries => hasProperty(u, MetricBoundariesTypeId) /** @internal */ export const fromIterable = (iterable: Iterable<number>): MetricBoundaries.MetricBoundaries => { const values = pipe( iterable, Arr.appendAll(Chunk.of(Number.POSITIVE_INFINITY)), Arr.dedupe ) return new MetricBoundariesImpl(values) } /** @internal */ export const linear = (options: { readonly start: number readonly width: number readonly count: number }): MetricBoundaries.MetricBoundaries => pipe( Arr.makeBy(options.count - 1, (i) => options.start + i * options.width), Chunk.unsafeFromArray, fromIterable ) /** @internal */ export const exponential = (options: { readonly start: number readonly factor: number readonly count: number }): MetricBoundaries.MetricBoundaries => pipe( Arr.makeBy(options.count - 1, (i) => options.start * Math.pow(options.factor, i)), Chunk.unsafeFromArray, fromIterable )
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium331.web-hosting.com
Server IP: 184.94.213.169
PHP Version: 8.1.34
Server Software: LiteSpeed
System: Linux premium331.web-hosting.com 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.88 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: livedhms
User ID (UID): 1344
Group ID (GID): 1349
Script Owner UID: 1344
Current Dir Owner: 1344