為了能讓大家能夠順利的建立起 Angular 18 開發環境,以下是需要安裝的相關軟體與安裝步驟與說明。
- Windows 10 以上版本
- Mac OS X 10.6 以上版本
| /** | |
| * Export all data from an IndexedDB database | |
| * | |
| * @param {IDBDatabase} idbDatabase The database to export from | |
| * @return {Promise<string>} | |
| */ | |
| export function exportToJson(idbDatabase) { | |
| return new Promise((resolve, reject) => { | |
| const exportObject = {} | |
| if (idbDatabase.objectStoreNames.length === 0) { |
| export const print = (v) => { | |
| const el = document.createElement('h3'); | |
| el.innerText = '🔵 ' + v; | |
| document.body.appendChild(el); | |
| } |
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
| function logClass(target: any) { | |
| // save a reference to the original constructor | |
| var original = target; | |
| // a utility function to generate instances of a class | |
| function construct(constructor, args) { | |
| var c : any = function () { | |
| return constructor.apply(this, args); | |
| } |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent| /** | |
| * Uncamelize a string, joining the words by separator character. | |
| * @param string Text to uncamelize | |
| * @param string Word separator | |
| * @return string Uncamelized text | |
| */ | |
| function uncamelize(text, separator) { | |
| // Assume separator is _ if no one has been provided. | |
| if(typeof(separator) == "undefined") { |