This file contains 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-config-standard. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ | |
// Importing necessary ESLint plugins using ES module syntax | |
import pluginN from 'eslint-plugin-n' | |
import * as pluginImport from 'eslint-plugin-import' | |
import pluginPromise from 'eslint-plugin-promise' | |
import globals from 'globals' | |
const config = { | |
languageOptions: { |
This file contains 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
Language | Inheritance | Encapsulation | Polymorphism | Constructors | Static Members | Multiple Inheritance | Method Overriding | Method Overloading | |
---|---|---|---|---|---|---|---|---|---|
C class | NA | NA | NA | NA | NA | NA | NA | NA | |
C++ class | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
C# class | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | |
Swift class | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | |
Zig class | NA | NA | NA | NA | NA | NA | NA | NA | |
Rust class | NA | NA | NA | NA | NA | NA | NA | NA | |
Go class | NA | NA | NA | NA | NA | NA | NA | NA | |
Odin class | NA | NA | NA | NA | NA | NA | NA | NA | |
D class | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
This file contains 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
Language | Inheritance | Encapsulation | Polymorphism | Constructors | Static Members | Multiple Inheritance | Method Overriding | Method Overloading | |
---|---|---|---|---|---|---|---|---|---|
C struct | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | |
C++ struct | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
C# struct | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ❌ | ✅ | |
Swift struct | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ❌ | ✅ | |
Zig struct | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | |
Rust struct | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | |
Go struct | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | |
Odin struct | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ | |
D struct | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ❌ | ✅ |
This file contains 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
Language | Inheritance | Encapsulation | Polymorphism | Constructors | Static Members | Multiple Inheritance | Method Overriding | Method Overloading | |
---|---|---|---|---|---|---|---|---|---|
C struct | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | |
C class | NA | NA | NA | NA | NA | NA | NA | NA | |
C++ struct | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
C++ class | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
C# struct | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ❌ | ✅ | |
C# class | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | |
Swift struct | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ❌ | ✅ | |
Swift class | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | |
Zig struct | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
This file contains 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
See comments |
This file contains 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 navigatorErrorMessage = 'Could not find `userAgent` or `userAgentData` window.navigator properties to set `os`, `browser` and `version`' | |
const removeExcessMozillaAndVersion = /^mozilla\/\d\.\d\W/ | |
const browserPattern = /(\w+)\/(\d+\.\d+(?:\.\d+)?(?:\.\d+)?)/g | |
const engineAndVersionPattern = /^(ver|cri|gec)/ | |
const userAgentData = window.navigator.userAgentData | |
const userAgent = window.navigator.userAgent | |
const unknown = 'Unknown' | |
const empty = '' | |
const brandList = ['chrome', 'opera', 'safari', 'edge', 'firefox'] |
This file contains 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
.parent-selector { | |
background: lime; | |
> .child-selector { | |
color: crimson; | |
} | |
} |
This file contains 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
[ | |
{ | |
"id": "5a6ce86d2af929789500e7ca", | |
"author": "Edsger W. Dijkstra", | |
"quote": "The computing scientist’s main challenge is not to get confused by the complexities of his own making." | |
}, | |
{ | |
"id": "5a6ce86f2af929789500e7f3", | |
"author": "Edsger W. Dijkstra", | |
"quote": "If debugging is the process of removing software bugs, then programming must be the process of putting them in." |
This file contains 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 { pasteInto } from '../../anti-framework.js' | |
let n = 0 | |
// The view callback prevents conditions and loops and operators at runtime. | |
const counterView = pasteInto('#root', ({ n }) => ` | |
<button value="-">-</button> | |
<button value="+">+</button> | |
<span>${n}</span> | |
`) |
This file contains 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 data = [1.5, 3.8, 6.7, 9.0, 11.2, 13.6, 16] | |
const data = [4, 4, 3, 5, 4, 3, 2, 2, 3, 4, 1, 1, 3] | |
const x = data.map((_, i) => i + 1) | |
const y = data | |
const xy = data.map((value, i) => (i + 1) * value) | |
const xPow2 = data.map((_, i) => (i + 1) ** 2) | |
//const sumOfX =data.reduce((acc, _, i) => acc + i |
NewerOlder