| (function (wm) {'use strict'; | |
| // original proposal via Oliver Dunk @oliverdunk_ via ES ML | |
| // (c) Andrea Giammarchi - (ISC) | |
| Object.defineProperties( | |
| Promise.prototype, | |
| { | |
| addListeners: { | |
| configurable: true, | |
| value: function addListeners(resolve, reject) { | |
| var once = wm.get(this); |
| /* | |
| Now a real module used in production! | |
| https://github.com/ungoldman/choo-store | |
| */ | |
| class Store { | |
| constructor (opts) { | |
| opts = opts || {} |
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| // https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_launch-configuration-support-for-npm-and-other-tools | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Launch via test NPM", | |
| "type": "node", |
While many remember the epic hyperHTML: A Virtual DOM Alternative post
I've published the 5th of March 2017,
the first official implementation
of the library was working as hyperHTML.bind(node) function for tagged literals the day before, and it's been in my experiments folder already for a little while.
At first glance people couldn't believe performance of the DBMonster demo shown in that article,
| var html = require('./index') | |
| var world = 'xyz' | |
| var planet = [ | |
| document.createElement('strong') | |
| ] | |
| planet[0].textContent = 'planet' | |
| var res = html.render(Main(world, planet)) | |
| function Main (world, who) { |
| function (user, context, callback) { | |
| user.app_metadata = user.app_metadata || {}; | |
| if ('stripe_customer_id' in user.app_metadata) { | |
| context.idToken['https://example.com/stripe_customer_id'] = user.app_metadata.stripe_customer_id; | |
| return callback(null, user, context); | |
| } | |
| var stripe = require('stripe')('sk_....'); | |
| var customer = { |
The proposal you’re about to read is not just a proposal. We have a working implementation of almost everything we discussed here. We encourage you to checkout and build our branch: our fork, with the relevant branch selected. Building and using the implementation will give you a better understanding of what using it as a developer is like.
Our implementation ended up differing from the proposal on some minor points. As our last action item before making a PR, we’re writing documentation on what we did. While I loathe pointing to tests in lieu of documentation, they will be helpful until we complete writing docs: the unit tests.
This repo also contains a bundled version of npm that has a new command, asset. You can read the documentation for and goals of that comma
| # this is not a bash file to execute, but run the following commands in your terminal | |
| # requirements (install instructions at bottom of page) | |
| # imagemin-cli, imagemin-mozjpeg, imagemin-pngquant, imagemin-webp, imagemagick (mogrify) | |
| -------------------------------------------------------------- | |
| # 1. create the appropriate directories | |
| $ mkdir build large large-webp small small-webp | |
| # 2. mozjpeg compression of fullsize images | |
| $ imagemin *.jpg --out-dir=build --plugin=mozjpeg && imagemin *.png --out-dir=build --plugin=pngquant |
- hypercore works with individual posts in an append-only feed
- hyperdrive abstracted filestore / works with files
- hyperdiscovery create p2p swarms for hypercores, hyperdrives, and hyperdbs
- hyperdb key-value database