Skip to content

Instantly share code, notes, and snippets.

View dignifiedquire's full-sized avatar

Friedel Ziegelmayer dignifiedquire

View GitHub Profile
> [email protected] test /Users/dignifiedquire/opensource/ipfs/orbit-db
> mocha
Orbit Client
1) Uncaught error outside test suite
2) Uncaught error outside test suite
3) Uncaught error outside test suite
// before
async.each(
Object.keys(this.transports),
(key, cb) => this.transports[key].close(cb),
() => {
// Ignoring close errors
callback()
}
)
'use strict'
const _ = require('lodash')
const Promise = require('bluebird')
module.exports = function loadAllPages (callFx, opts) {
opts['page'] = opts.page || 1
const res = []
return Promise
.resolve(callFx(opts))
'use strict'
const _ = require('highland')
// Fake dagservice get
const get = (hash, cb) => {
cb(null, {
type: 'file',
data: Math.random() + hash,
links: []
@dignifiedquire
dignifiedquire / index.js
Last active March 24, 2016 22:05
Auto upgrade to dignified.js
'use strict'
const exec = require('child_process').execSync
const path = require('path')
const fs = require('fs')
const glob = require('glob')
const name = process.argv[2]
console.log('Starting to transform %s', name)
├── dist # auto-generated by the transpile and minification task.
│ ├── index.js
│ └── index.min.js
├── lib # auto-generated source tree, transpiled using babel. Makes the code es5 compatible
│ ├── index.js
│ └── ...
├── src # source code. Can use the latest features (ES2015) in JavaScript.
│ ├── index.js
│ └── ...
├── test # tests folder
{
"scripts": {
"lint": "dignified-lint",
"build": "dignified-build",
"test": "dignified-test",
"test:node": "dignified-test node",
"test:browser": "dignified-test browser",
"release": "dignified-release"
}
}
const API = require('ipfs-api/src')
var API = require('ipfs-api')
<script src="https://npmcdn.com/ipfs-api/dist/index.js"></script>
<script src="https://npmcdn.com/ipfs-api/dist/index.min.js"></script>