parent
43c069719c
commit
e87e889a87
12 changed files with 331 additions and 20 deletions
18
markdown/dev/reference/terms/cjs/en.md
Normal file
18
markdown/dev/reference/terms/cjs/en.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
title: cjs
|
||||
---
|
||||
|
||||
**cjs** stands for **CommonJS**. It is a module system for JavaScript that was
|
||||
popularized by NodeJS, and as such typically used in server-side JavaScript.
|
||||
|
||||
CommonJS uses the **require** keyword to import modules:
|
||||
|
||||
```js
|
||||
const fs = require('fs')
|
||||
```
|
||||
|
||||
In recent years, **cjs** is increasingly being replaced by **esm**, or ECMA
|
||||
Script Modules which is the official module system of the JavaScript language,
|
||||
and the future-proof choice.
|
||||
|
||||
Since version 3, FreeSewing is ESM-only.
|
7
markdown/dev/reference/terms/en.md
Normal file
7
markdown/dev/reference/terms/en.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: Terminology
|
||||
---
|
||||
|
||||
These are terms that we use on this website that may or may not be new to you:
|
||||
|
||||
<ReadMore />
|
17
markdown/dev/reference/terms/esm/en.md
Normal file
17
markdown/dev/reference/terms/esm/en.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
title: esm
|
||||
---
|
||||
|
||||
**esm** stands for **ECMAScript Modules** and is the official module system of
|
||||
the JavaScript language, supported both in the browser, and on the server.
|
||||
|
||||
While ESM is the official standard, before it existed people would typically use CJS outside the browser, as it was popularized by NodeJS.
|
||||
Some libraries still are not available in ESM, but FreeSewing has been ESM-only since version 3.
|
||||
|
||||
|
||||
ESM uses the **import** keyword to import modules:
|
||||
|
||||
```js
|
||||
import fs from 'fs'
|
||||
```
|
||||
|
14
markdown/dev/reference/terms/variadic/en.md
Normal file
14
markdown/dev/reference/terms/variadic/en.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: Variadic
|
||||
---
|
||||
|
||||
A **variadic** function is a function that accepts a variable number of arguments.
|
||||
|
||||
For example, JavaScript's `console.log` method is variadic:
|
||||
|
||||
```js
|
||||
console.log('one')
|
||||
console.log('one', 'two')
|
||||
console.log('one', 'two', 'three')
|
||||
console.log('It', 'word', 'regardless', 'of', 'how', 'many', 'arguments', 'you', 'pass')
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue