File tree Expand file tree Collapse file tree
packages/@glimmer/runtime/lib/helpers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { DEBUG } from '@glimmer/env' ;
22
3- export const gt = ( ...args : unknown [ ] ) => {
4- if ( DEBUG && args . length !== 2 ) {
5- throw new Error ( `\`gt\` expects exactly two arguments, but received ${ args . length } .` ) ;
3+ /**
4+ * Performs a greater than comparison.
5+ *
6+ * left > right
7+ */
8+ export function gt ( left : unknown , right : unknown ) {
9+ if ( DEBUG && arguments . length !== 2 ) {
10+ throw new Error ( `\`gt\` expects exactly two arguments, but received ${ arguments . length } .` ) ;
611 }
712
8- return ( args [ 0 ] as number ) > ( args [ 1 ] as number ) ;
9- } ;
13+ return ( left as number ) > ( right as number ) ;
14+ }
Original file line number Diff line number Diff line change 11import { DEBUG } from '@glimmer/env' ;
22
3- export const gte = ( ...args : unknown [ ] ) => {
4- if ( DEBUG && args . length !== 2 ) {
5- throw new Error ( `\`gte\` expects exactly two arguments, but received ${ args . length } .` ) ;
3+ /**
4+ * Performs a greater than or equal comparison.
5+ *
6+ * left >= right
7+ */
8+ export function gte ( left : unknown , right : unknown ) {
9+ if ( DEBUG && arguments . length !== 2 ) {
10+ throw new Error ( `\`gte\` expects exactly two arguments, but received ${ arguments . length } .` ) ;
611 }
712
8- return ( args [ 0 ] as number ) >= ( args [ 1 ] as number ) ;
9- } ;
13+ return ( left as number ) >= ( right as number ) ;
14+ }
Original file line number Diff line number Diff line change 11import { DEBUG } from '@glimmer/env' ;
22
3- export const lt = ( ...args : unknown [ ] ) => {
4- if ( DEBUG && args . length !== 2 ) {
5- throw new Error ( `\`lt\` expects exactly two arguments, but received ${ args . length } .` ) ;
3+ /**
4+ * Performs a less than comparison.
5+ *
6+ * left < right
7+ */
8+ export function lt ( left : unknown , right : unknown ) {
9+ if ( DEBUG && arguments . length !== 2 ) {
10+ throw new Error ( `\`lt\` expects exactly two arguments, but received ${ arguments . length } .` ) ;
611 }
712
8- return ( args [ 0 ] as number ) < ( args [ 1 ] as number ) ;
9- } ;
13+ return ( left as number ) < ( right as number ) ;
14+ }
Original file line number Diff line number Diff line change 11import { DEBUG } from '@glimmer/env' ;
22
3- export const lte = ( ...args : unknown [ ] ) => {
4- if ( DEBUG && args . length !== 2 ) {
5- throw new Error ( `\`lte\` expects exactly two arguments, but received ${ args . length } .` ) ;
3+ /**
4+ * Performs a less than or equal comparison.
5+ *
6+ * left <= right
7+ */
8+ export function lte ( left : unknown , right : unknown ) {
9+ if ( DEBUG && arguments . length !== 2 ) {
10+ throw new Error ( `\`lte\` expects exactly two arguments, but received ${ arguments . length } .` ) ;
611 }
712
8- return ( args [ 0 ] as number ) <= ( args [ 1 ] as number ) ;
9- } ;
13+ return ( left as number ) <= ( right as number ) ;
14+ }
You can’t perform that action at this time.
0 commit comments