ng-apimock is a tool that provides scenario based API mocking. It can be used to test and develop applications without the need of a backend. Alternatively you can also chose to let certain calls through to the actual backend and apply mocking selectively.
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 Student: | |
| students = {} | |
| def __init__(self, id, name): | |
| self.id = id | |
| self.name = name | |
| self.grades = {} | |
| def __str__(self): |
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 Book: | |
| """A book of a library""" | |
| def __init__(self, title, author, borrowed=False): | |
| self.title = title | |
| self.author = author | |
| self.is_borrowed = borrowed | |
| def __str__(self): | |
| return f"Title: {self.title}, Author: {self.author}, Borrowed: {'Yes' if self.is_borrowed else 'No'}" |
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
| const BOOKS = [ | |
| '1', | |
| 'The Stranger\nThe Outsider', | |
| 'Albert Camus', | |
| '1942', | |
| 'French', | |
| '2', | |
| 'In Search of Lost Time\nRemembrance of Things Past', | |
| 'Marcel Proust', | |
| '1913–27', |
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
| /* eslint-disable max-classes-per-file */ | |
| /* eslint-disable @angular-eslint/component-selector */ | |
| import { | |
| ChangeDetectionStrategy, | |
| Component, | |
| effect, | |
| inject, | |
| Injectable, | |
| OnInit, |
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
Show hidden characters
| { | |
| "extends": ["../../../../.eslintrc.json"], | |
| "ignorePatterns": ["!**/*"], | |
| "overrides": [ | |
| { | |
| "files": ["*.ts"], | |
| "rules": { | |
| "@angular-eslint/directive-selector": [ | |
| "error", | |
| { |
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
| { | |
| "root": true, | |
| "ignorePatterns": ["**/*"], | |
| "plugins": ["@nx"], | |
| "overrides": [ | |
| { | |
| "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | |
| "parser": "@typescript-eslint/parser", | |
| "parserOptions": { | |
| "project": ["./tsconfig.base.json"] |
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
| """ | |
| Tic Tac Toe Player | |
| """ | |
| import math | |
| import random | |
| import copy | |
| X = "X" | |
| O = "O" |
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
| /** | |
| * Sources: | |
| * https://www.rollingstone.com/movies/movie-lists/best-sports-movies-rocky-rudy-71467/ | |
| * https://www.vulture.com/article/best-sports-movies-ranked.html | |
| * | |
| * Combined and de-duplicated list from both sources, resulted in 62 movies | |
| * Both documentary and feature films are included in this list... | |
| * | |
| * Is 'The Big Lebowski' really a bowling film? | |
| * Are coaches movies their own genre? |
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
| module.exports = { | |
| ignorePatterns: ['.eslintrc.js'], | |
| env: { | |
| browser: true, | |
| es6: true, | |
| }, | |
| parser: '@typescript-eslint/parser', | |
| parserOptions: { | |
| project: 'tsconfig.json', | |
| sourceType: 'module', |
NewerOlder