The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. You also need to put"type": "module"
in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.
const bypass = [ | |
// function names to avoid logging | |
]; | |
const collapsed = [ | |
// function names to groupCollapsed | |
]; | |
module.exports = function(babel) { | |
const { types: t } = babel; | |
const wrapFunctionBody = babel.template(`{ |
⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,
from io import StringIO | |
def double(): | |
x = input("Enter an integer: ") | |
return int(x) * 2 | |
def adding(): | |
x = float(input('Enter the first number')) |
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:
#!/usr/bin/env python3 | |
import sys | |
import requests | |
import base64 | |
# https://github.com/shadowsocksr-backup/shadowsocks-rss/wiki/SSR-QRcode-scheme | |
# usage: $0 https://example.com/list '/usr/local/bin/ss-local' | |
subscribe_url = sys.argv[1] | |
exec_path = sys.argv[2] |
const querystring = require('querystring') | |
let args = process.argv.slice(2) | |
if (!args[0]) { | |
console.error("Usage: node index.js [subscribe_list_base64_encoded]") | |
process.exit(1) | |
} |