We have the same code working using node, deno, and bun.
E.g.,
bun run index.js
| /** @OnlyCurrentDoc */ | |
| const startDate = new Date("2021-06-16") | |
| // so the first one is D2:K2 | |
| function MarkEmptyCellsInYesterdayRowWithHyphen() { | |
| const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Group 2 - B"); | |
| // Activates the sheet | |
| SpreadsheetApp.setActiveSheet(sheet); | |
| const today = new Date() |
@module-federation/nextjs-mf.yarn add @module-federation/nextjs-mfpackage.json: "resolutions": {| /* eslint-disable no-console */ | |
| import client from 'part:@sanity/base/client' | |
| // Run this script with: `sanity exec --with-user-token migrations/migrateValues.js` | |
| // | |
| // This example shows how you may write a migration script that migrates a field value | |
| // on a specific document type. | |
| // This will migrate documents in batches of 100 and continue patching until no more documents are | |
| // returned from the query. | |
| // |
| /* | |
| Copy this into the console of any web page that is interactive and doesn't | |
| do hard reloads. You will hear your DOM changes as different pitches of | |
| audio. | |
| I have found this interesting for debugging, but also fun to hear web pages | |
| render like UIs do in movies. | |
| */ | |
| const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.
But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.
Svelte is a language.
Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?
A few projects that have answered this question:
| import { takeEvery } from 'redux-saga'; | |
| import { call, put } from 'redux-saga/effects'; | |
| // Watcher | |
| function* watchFetchData() { | |
| yield* takeEvery('FETCH_REQUESTED', fetchData); | |
| } | |
| // Worker | |
| function* fetchData(action) { |
| describe('PostsEffects', () => { | |
| let runner, postsEffects, postsService; | |
| beforeEach(() => TestBed.configureTestingModule({ | |
| imports: [ | |
| EffectsTestingModule | |
| ], | |
| providers: [ | |
| PostsEffects, | |
| { |
| const compose = (...fns) => x => fns.reduceRight((v, f) => f(v), x); |
| const pipe = (...fns) => x => fns.reduce((v, f) => f(v), x); | |
| const fn1 = s => s.toLowerCase(); | |
| const fn2 = s => s.split('').reverse().join(''); | |
| const fn3 = s => s + '!' | |
| const newFunc = pipe(fn1, fn2, fn3); | |
| const result = newFunc('Time'); // emit! |