This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:20 as base | |
# Create app directory | |
WORKDIR /app | |
# Copy lock files | |
COPY package.json bun.lockb package-lock.json ./ | |
# Install app dependencies | |
RUN npm ci |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<pre>{{ user$ | async | json }}</pre> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ValidatorFn } from '@angular/forms'; | |
export type BooleanFn = () => boolean; | |
export function conditionalValidator( | |
predicate: BooleanFn, | |
validator: ValidatorFn, | |
errorNamespace?: string | |
): ValidatorFn { | |
return (formControl) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Print to console": { | |
"prefix": "log", | |
"body": ["console.log('$1: ', $1);", "$2"], | |
"description": "Log output to console" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Angular CLI version | Angular version | Node.js version | TypeScript version | RxJS version | |
---|---|---|---|---|---|
1.0.0-beta.17 (package name: angular-cli) | ~2.0.2 | ^6.9.5 | ~2.0.10 | ^5.0.3 | |
1.0.0-beta.20-1 (package name: angular-cli) | ~2.1.2 | ^6.9.5 | ~2.0.10 | ^5.0.3 | |
1.0.0-beta.22-1 (package name: angular-cli) | ~2.2.4 | ^6.9.5 | ~2.0.10 | ^5.0.3 | |
1.0.0-beta.30 | ~2.3.1 | ^6.9.5 | ~2.0.10 | ^5.0.3 | |
1.0.0-rc.4 | ~2.4.10 | ^6.9.5 | ~2.0.10 | ^5.0.3 | |
~1.0.6 | >= 4.0.3 <= 4.1.3 | ^6.9.5 | ~2.2.2 | ^5.0.3 | |
~1.1.3 | >= 4.0.3 <= 4.1.3 | ^6.9.5 | ~2.3.4 | ^5.0.3 | |
~1.2.7 | >= 4.0.3 <= 4.1.3 | ^6.9.5 | ~2.3.4 | ^5.0.3 | |
~1.3.2 | >= 4.2.6 <= 4.4.7 | ^6.9.5 | ~2.4.2 | ^5.0.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* $bp-mega: 2500px; | |
* $bp-mega: 1900px; | |
* $bp-kilo: 1360px; | |
* $bp-centi: 1024px; | |
* $bp-milli: 768px; | |
* $bp-nano: 480px; | |
*/ | |
$breakpoint-map: ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { of, BehaviorSubject } from 'rxjs'; | |
import { fromFetch } from 'rxjs/fetch'; | |
import { switchMap, catchError } from 'rxjs/operators'; | |
interface CustomMethodInterface { | |
name: string; | |
endpoint: string; | |
method: 'GET' | 'POST' | 'PATCH' | 'DELETE'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- | |
The entry point for client. This file is loaded just once when the client is captured. | |
It contains socket.io and all the communication logic. | |
--> | |
<html> | |
<head> | |
<!-- %X_UA_COMPATIBLE% --> | |
<title>Karma</title> | |
<link href="favicon.ico" rel="icon" type="image/x-icon" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class klass { | |
constructor() {} | |
sum(...args) { | |
this.value = args.reduce((sum, current) => sum + current, 0); | |
return this; | |
} | |
add(value) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let myArr = [0, 2, 5] | |
let arr2 = [1, 6, 7] | |
// Attach a value to the end of an array | |
myArr.push(6) | |
console.log(myArr) // [0, 2, 5, 6] | |
// Attach a value to the beginning of an array | |
myArr.unshift(3) | |
console.log(myArr) // [3, 0, 2, 5, 6] |