-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(polyfill): adds support for 'globalThis'
feat(debug): adds user agent information to request logging docs(readme): updates README with usage description of the new 'context' feature docs(readme): updates README with an auto-generated list of all polyfill names, including aliases.
- Loading branch information
Showing
13 changed files
with
650 additions
and
411 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
...require("@wessberg/ts-config/scaffold.config"), | ||
logo: { | ||
url: "https://raw.githubusercontent.com/wessberg/Polyfiller/master/documentation/asset/logo-color-text.png", | ||
height: 80 | ||
} | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import {constant} from "../src/constant/constant"; | ||
import {PolyfillName} from "../src/polyfill/polyfill-name"; | ||
import {PolyfillDictEntry} from "../src/polyfill/polyfill-dict"; | ||
|
||
const seenPolyfills: Set<PolyfillName> = new Set(); | ||
|
||
let formatted = ""; | ||
|
||
const entries = Object.entries(constant.polyfill) as [PolyfillName, PolyfillDictEntry][]; | ||
|
||
// Start with listing all aliases as well as the polyfills they alias | ||
for (const [key, value] of entries) { | ||
if ("polyfills" in value) { | ||
seenPolyfills.add(key); | ||
formatted += `- **\`${key}\`**\n`; | ||
value.polyfills.forEach(polyfill => { | ||
seenPolyfills.add(polyfill); | ||
formatted += ` - \`${polyfill}\`\n`; | ||
}); | ||
} | ||
} | ||
|
||
// Go another round, but this time only list those polyfills that hasn't been seen yet (and isn't aliases) | ||
for (const [key, value] of entries) { | ||
if ("polyfills" in value || seenPolyfills.has(key)) continue; | ||
formatted += `- \`${key}\`\n`; | ||
} | ||
|
||
console.log(formatted); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "@wessberg/ts-config", | ||
"compilerOptions": { | ||
"target": "es2017", | ||
"module": "commonjs" | ||
} | ||
} |
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
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
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
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
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