mirror of
https://github.com/amark/gun.git
synced 2025-06-07 14:46:44 +00:00
Fix typos (#1299)
This commit is contained in:
parent
1bdab7394a
commit
9e616ea3a9
@ -211,7 +211,7 @@ This would not be possible without **community contributors**, big shout out to:
|
|||||||
|
|
||||||
**[ajmeyghani](https://github.com/ajmeyghani) ([Learn GUN Basics with Diagrams](https://medium.com/@ajmeyghani/gundb-a-graph-database-in-javascript-3860a08d873c))**; **[anywhichway](https://github.com/anywhichway) ([Block Storage](https://github.com/anywhichway/gun-block))**; **[beebase](https://github.com/beebase) ([Quasar](https://github.com/beebase/gun-vuex-quasar))**; **[BrockAtkinson](https://github.com/BrockAtkinson) ([brunch config](https://github.com/BrockAtkinson/brunch-gun))**; **[Brysgo](https://github.com/brysgo) ([GraphQL](https://github.com/brysgo/graphql-gun))**; **[d3x0r](https://github.com/d3x0r) ([SQLite](https://github.com/d3x0r/gun-db))**; **[forrestjt](https://github.com/forrestjt) ([file.js](https://github.com/amark/gun/blob/master/lib/file.js))**; **[hillct](https://github.com/hillct) (Docker)**; **[JosePedroDias](https://github.com/josepedrodias) ([graph visualizer](http://acor.sl.pt:9966))**; **[JuniperChicago](https://github.com/JuniperChicago) ([cycle.js bindings](https://github.com/JuniperChicago/cycle-gun))**; **[jveres](https://github.com/jveres) ([todoMVC](https://github.com/jveres/todomvc))**; **[kristianmandrup](https://github.com/kristianmandrup) ([edge](https://github.com/kristianmandrup/gun-edge))**; **[Lightnet](https://github.com/Lightnet)** ([Awesome Vue User Examples](https://glitch.com/edit/#!/jsvuegunui?path=README.md:1:0) & [User Kitchen Sink Playground](https://gdb-auth-vue-node.glitch.me/)); **[lmangani](https://github.com/lmangani) ([Cytoscape Visualizer](https://github.com/lmangani/gun-scape), [Cassandra](https://github.com/lmangani/gun-cassandra), [Fastify](https://github.com/lmangani/fastify-gundb), [LetsEncrypt](https://github.com/lmangani/polyGun-letsencrypt))**; **[mhelander](https://github.com/mhelander) ([SEA](https://github.com/amark/gun/blob/master/sea.js))**; [omarzion](https://github.com/omarzion) ([Sticky Note App](https://github.com/omarzion/stickies)); [PsychoLlama](https://github.com/PsychoLlama) ([LevelDB](https://github.com/PsychoLlama/gun-level)); **[RangerMauve](https://github.com/RangerMauve) ([schema](https://github.com/gundb/gun-schema))**; **[robertheessels](https://github.com/swifty) ([gun-p2p-auth](https://github.com/swifty/gun-p2p-auth))**; **[rogowski](https://github.com/rogowski) (AXE)**; [sbeleidy](https://github.com/sbeleidy); **[sbiaudet](https://github.com/sbiaudet) ([C# Port](https://github.com/sbiaudet/cs-gun))**; **[Sean Matheson](https://github.com/ctrlplusb) ([Observable/RxJS/Most.js bindings](https://github.com/ctrlplusb/gun-most))**; **[Shadyzpop](https://github.com/Shadyzpop) ([React Native example](https://github.com/amark/gun/tree/master/examples/react-native))**; **[sjones6](https://github.com/sjones6) ([Flint](https://github.com/sjones6/gun-flint))**; RIP **[Stefdv](https://github.com/stefdv) (Polymer/web components)**; **[zrrrzzt](https://github.com/zrrrzzt) ([JWT Auth](https://gist.github.com/zrrrzzt/6f88dc3cedee4ee18588236756d2cfce))**; **[xmonader](https://github.com/xmonader) ([Python Port](https://github.com/xmonader/pygundb))**;
|
**[ajmeyghani](https://github.com/ajmeyghani) ([Learn GUN Basics with Diagrams](https://medium.com/@ajmeyghani/gundb-a-graph-database-in-javascript-3860a08d873c))**; **[anywhichway](https://github.com/anywhichway) ([Block Storage](https://github.com/anywhichway/gun-block))**; **[beebase](https://github.com/beebase) ([Quasar](https://github.com/beebase/gun-vuex-quasar))**; **[BrockAtkinson](https://github.com/BrockAtkinson) ([brunch config](https://github.com/BrockAtkinson/brunch-gun))**; **[Brysgo](https://github.com/brysgo) ([GraphQL](https://github.com/brysgo/graphql-gun))**; **[d3x0r](https://github.com/d3x0r) ([SQLite](https://github.com/d3x0r/gun-db))**; **[forrestjt](https://github.com/forrestjt) ([file.js](https://github.com/amark/gun/blob/master/lib/file.js))**; **[hillct](https://github.com/hillct) (Docker)**; **[JosePedroDias](https://github.com/josepedrodias) ([graph visualizer](http://acor.sl.pt:9966))**; **[JuniperChicago](https://github.com/JuniperChicago) ([cycle.js bindings](https://github.com/JuniperChicago/cycle-gun))**; **[jveres](https://github.com/jveres) ([todoMVC](https://github.com/jveres/todomvc))**; **[kristianmandrup](https://github.com/kristianmandrup) ([edge](https://github.com/kristianmandrup/gun-edge))**; **[Lightnet](https://github.com/Lightnet)** ([Awesome Vue User Examples](https://glitch.com/edit/#!/jsvuegunui?path=README.md:1:0) & [User Kitchen Sink Playground](https://gdb-auth-vue-node.glitch.me/)); **[lmangani](https://github.com/lmangani) ([Cytoscape Visualizer](https://github.com/lmangani/gun-scape), [Cassandra](https://github.com/lmangani/gun-cassandra), [Fastify](https://github.com/lmangani/fastify-gundb), [LetsEncrypt](https://github.com/lmangani/polyGun-letsencrypt))**; **[mhelander](https://github.com/mhelander) ([SEA](https://github.com/amark/gun/blob/master/sea.js))**; [omarzion](https://github.com/omarzion) ([Sticky Note App](https://github.com/omarzion/stickies)); [PsychoLlama](https://github.com/PsychoLlama) ([LevelDB](https://github.com/PsychoLlama/gun-level)); **[RangerMauve](https://github.com/RangerMauve) ([schema](https://github.com/gundb/gun-schema))**; **[robertheessels](https://github.com/swifty) ([gun-p2p-auth](https://github.com/swifty/gun-p2p-auth))**; **[rogowski](https://github.com/rogowski) (AXE)**; [sbeleidy](https://github.com/sbeleidy); **[sbiaudet](https://github.com/sbiaudet) ([C# Port](https://github.com/sbiaudet/cs-gun))**; **[Sean Matheson](https://github.com/ctrlplusb) ([Observable/RxJS/Most.js bindings](https://github.com/ctrlplusb/gun-most))**; **[Shadyzpop](https://github.com/Shadyzpop) ([React Native example](https://github.com/amark/gun/tree/master/examples/react-native))**; **[sjones6](https://github.com/sjones6) ([Flint](https://github.com/sjones6/gun-flint))**; RIP **[Stefdv](https://github.com/stefdv) (Polymer/web components)**; **[zrrrzzt](https://github.com/zrrrzzt) ([JWT Auth](https://gist.github.com/zrrrzzt/6f88dc3cedee4ee18588236756d2cfce))**; **[xmonader](https://github.com/xmonader) ([Python Port](https://github.com/xmonader/pygundb))**;
|
||||||
|
|
||||||
I am missing many others, apologies, will be adding them soon! This list is infintiely old & way out of date, if you want to be listed in it please make a PR! :)
|
I am missing many others, apologies, will be adding them soon! This list is infinitely old & way out of date, if you want to be listed in it please make a PR! :)
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import { pick } from 'underscore';
|
|||||||
export function on$(node, cleanup = true): Observable<any> {
|
export function on$(node, cleanup = true): Observable<any> {
|
||||||
return Observable.fromEventPattern(
|
return Observable.fromEventPattern(
|
||||||
h => {
|
h => {
|
||||||
// there is no way to off() an on() until at least one value is trigerred
|
// there is no way to off() an on() until at least one value is triggered
|
||||||
// so that we can access the event listener to off() it
|
// so that we can access the event listener to off() it
|
||||||
const signal = { stop: false };
|
const signal = { stop: false };
|
||||||
node.on((data, key, at, ev) => {
|
node.on((data, key, at, ev) => {
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
color: skyblue;
|
color: skyblue;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: poiner;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
ul, li {
|
ul, li {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
|
@ -10,7 +10,7 @@ import { fromObjects, toObjects } from './asyncSerialize';
|
|||||||
import { subtle } from './compat';
|
import { subtle } from './compat';
|
||||||
export function parse(text) {
|
export function parse(text) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
// need decodeURIComponent so binary strings are transfered properly
|
// need decodeURIComponent so binary strings are transferred properly
|
||||||
const deocodedText = unescape(text);
|
const deocodedText = unescape(text);
|
||||||
const objects = JSON.parse(deocodedText);
|
const objects = JSON.parse(deocodedText);
|
||||||
return fromObjects(serializers(true), objects);
|
return fromObjects(serializers(true), objects);
|
||||||
@ -19,7 +19,7 @@ export function parse(text) {
|
|||||||
export function stringify(value, waitForArrayBufferView = true) {
|
export function stringify(value, waitForArrayBufferView = true) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const serialized = yield toObjects(serializers(waitForArrayBufferView), value);
|
const serialized = yield toObjects(serializers(waitForArrayBufferView), value);
|
||||||
// need encodeURIComponent so binary strings are transfered properly
|
// need encodeURIComponent so binary strings are transferred properly
|
||||||
const message = JSON.stringify(serialized);
|
const message = JSON.stringify(serialized);
|
||||||
return escape(message);
|
return escape(message);
|
||||||
});
|
});
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
This is example of simple Vue plugin. It works exatcly same as the Vue instance data property, but the name is gunData.<br>
|
This is example of simple Vue plugin. It works exactly same as the Vue instance data property, but the name is gunData.<br>
|
||||||
The cool part is that every property in the gunData is realtime synced via gunDB to every other page viewer!<br>
|
The cool part is that every property in the gunData is realtime synced via gunDB to every other page viewer!<br>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -25,16 +25,16 @@
|
|||||||
* - gc_info : sets the ~ amount of time between info messages
|
* - gc_info : sets the ~ amount of time between info messages
|
||||||
* this is checked every time the gc is ran
|
* this is checked every time the gc is ran
|
||||||
* - gc_info_mini : this will use a smaller, less user friendly info printout
|
* - gc_info_mini : this will use a smaller, less user friendly info printout
|
||||||
* - gc_importance_func : This will be the function used for finding the importance of a potental collect
|
* - gc_importance_func : This will be the function used for finding the importance of a potential collect
|
||||||
* takes the form of func(timestamp, ctime, memoryUsageRatio) {return val}
|
* takes the form of func(timestamp, ctime, memoryUsageRatio) {return val}
|
||||||
* Collects when returned value is 100
|
* Collects when returned value is 100
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//NOTE: set to false to use require for getting gun DEFUALT: false
|
//NOTE: set to false to use require for getting gun DEFAULT: false
|
||||||
var USELOCALGUN = false;
|
var USELOCALGUN = false;
|
||||||
|
|
||||||
|
|
||||||
//NOTE: adds some debug messages DEFUALT: false
|
//NOTE: adds some debug messages DEFAULT: false
|
||||||
var DEBUG = false;
|
var DEBUG = false;
|
||||||
|
|
||||||
if(!(typeof window !== "undefined") && USELOCALGUN)
|
if(!(typeof window !== "undefined") && USELOCALGUN)
|
||||||
|
@ -98,7 +98,7 @@
|
|||||||
var name, tag, tags = opt.tags;
|
var name, tag, tags = opt.tags;
|
||||||
for(name in tags) {
|
for(name in tags) {
|
||||||
if(opt.hierarchy.indexOf(name)===-1)
|
if(opt.hierarchy.indexOf(name)===-1)
|
||||||
throw Error('tag "'+name+'" is missing hierachy definition');
|
throw Error('tag "'+name+'" is missing hierarchy definition');
|
||||||
}
|
}
|
||||||
opt.hierarchy.forEach(function(name){
|
opt.hierarchy.forEach(function(name){
|
||||||
if(!tags[name]){
|
if(!tags[name]){
|
||||||
@ -117,7 +117,7 @@
|
|||||||
|
|
||||||
// GENERAL UTILS
|
// GENERAL UTILS
|
||||||
|
|
||||||
function get(o, args){ // path argments as separate string parameters
|
function get(o, args){ // path arguments as separate string parameters
|
||||||
if(typeof args === 'string')
|
if(typeof args === 'string')
|
||||||
return o[args[0]];
|
return o[args[0]];
|
||||||
var i = 0, l = args.length, u;
|
var i = 0, l = args.length, u;
|
||||||
|
4
lib/not.d.ts
vendored
4
lib/not.d.ts
vendored
@ -7,11 +7,11 @@ declare module '../types/gun/IGunChain' {
|
|||||||
* through it, then you have a pretty reasonable assurance that a not found means that
|
* through it, then you have a pretty reasonable assurance that a not found means that
|
||||||
* the data doesn't exist yet. Just be mindful of how you use it
|
* the data doesn't exist yet. Just be mindful of how you use it
|
||||||
*
|
*
|
||||||
* @param callack If there's reason to believe the data doesn't exist, the callback will be
|
* @param callback If there's reason to believe the data doesn't exist, the callback will be
|
||||||
* invoked. This can be used as a check to prevent implicitly writing data
|
* invoked. This can be used as a check to prevent implicitly writing data
|
||||||
*/
|
*/
|
||||||
not(
|
not(
|
||||||
callack: (key: string) => void
|
callback: (key: string) => void
|
||||||
): IGunChain<TNode, TChainParent, TGunInstance, TKey>;
|
): IGunChain<TNode, TChainParent, TGunInstance, TKey>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Turn any part of a gun chain into a promise, that you can then use
|
* Turn any part of a gun chain into a promise, that you can then use
|
||||||
* .then().catch() pattern.
|
* .then().catch() pattern.
|
||||||
* In normal gun doing var item = gun.get('someKey'), gun returns a reference
|
* In normal gun doing var item = gun.get('someKey'), gun returns a reference
|
||||||
* to the someKey synchroneously. Using a reference is quite helpful in making
|
* to the someKey synchronously. Using a reference is quite helpful in making
|
||||||
* graph structures, so I have chosen to follow the following paradigm.
|
* graph structures, so I have chosen to follow the following paradigm.
|
||||||
* Whenever a promise is resolved, gun will return an object of data, I will
|
* Whenever a promise is resolved, gun will return an object of data, I will
|
||||||
* wrap that data in an object together with the reference like so:
|
* wrap that data in an object together with the reference like so:
|
||||||
@ -62,7 +62,7 @@ function sleep (limit) {
|
|||||||
* @param item (string / object) - item to be put to that key in the chain
|
* @param item (string / object) - item to be put to that key in the chain
|
||||||
* @param opt - option object
|
* @param opt - option object
|
||||||
* @return object - Returns an object with the ref to that node that was just
|
* @return object - Returns an object with the ref to that node that was just
|
||||||
* created as well as the 'ack' which acknowledges the put was succesful
|
* created as well as the 'ack' which acknowledges the put was successful
|
||||||
* object {ref: gunReference, ack: acknowledgmentObject}
|
* object {ref: gunReference, ack: acknowledgmentObject}
|
||||||
* If put had an error we can catch the return via .catch
|
* If put had an error we can catch the return via .catch
|
||||||
*/
|
*/
|
||||||
@ -82,7 +82,7 @@ Gun.chain.promPut = async function (item, opt) {
|
|||||||
* @param item (string / object) - item to be set into a list at this key
|
* @param item (string / object) - item to be set into a list at this key
|
||||||
* @param opt - option object
|
* @param opt - option object
|
||||||
* @return object - Returns object with the ref to that node that was just
|
* @return object - Returns object with the ref to that node that was just
|
||||||
* created as well as the 'ack' which acknowledges the set was succesful
|
* created as well as the 'ack' which acknowledges the set was successful
|
||||||
* object {ref: gunReference, ack: acknowledgmentObject}
|
* object {ref: gunReference, ack: acknowledgmentObject}
|
||||||
* If set had an error we can catch the return via .catch
|
* If set had an error we can catch the return via .catch
|
||||||
*/
|
*/
|
||||||
|
16
lib/wave.js
16
lib/wave.js
@ -334,7 +334,7 @@ edide.var = (function (edide, mod_var) {
|
|||||||
ref.reactiveGraph();
|
ref.reactiveGraph();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw Error("Inifinite loop in \:var dependencies");
|
throw Error("Infinite loop in \:var dependencies");
|
||||||
}
|
}
|
||||||
if (debugging) {
|
if (debugging) {
|
||||||
edide.logProd(`updating ${name}`);
|
edide.logProd(`updating ${name}`);
|
||||||
@ -436,7 +436,7 @@ edide.reactiveWithFilters = (function (edide, reactiveWithFilters) {
|
|||||||
throw Error(`Illegal reactive (${prop}: ${value})`);
|
throw Error(`Illegal reactive (${prop}: ${value})`);
|
||||||
}
|
}
|
||||||
edide.var(`${id}.${prop}`, value);
|
edide.var(`${id}.${prop}`, value);
|
||||||
return true; // Proxy set must return true if set is successfull; In the future use Reflect.set, which returns true automatically?
|
return true; // Proxy set must return true if set is successful; In the future use Reflect.set, which returns true automatically?
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
revar = new Proxy((todoMap = new Map), handler); // NOTE: map is not used yet
|
revar = new Proxy((todoMap = new Map), handler); // NOTE: map is not used yet
|
||||||
@ -754,11 +754,11 @@ edide.musicScales = (function (edide, musicScales) {Object.defineProperty(this,
|
|||||||
fantastical: 'M8M',
|
fantastical: 'M8M',
|
||||||
sadness: 'M4m',
|
sadness: 'M4m',
|
||||||
romantic: 'M5m', // and middle eastern
|
romantic: 'M5m', // and middle eastern
|
||||||
wonder: 'm5M', // and trancendence
|
wonder: 'm5M', // and transcendence
|
||||||
mystery: 'm2M', // and dark comedy
|
mystery: 'm2M', // and dark comedy
|
||||||
dramatic: 'm11M',
|
dramatic: 'm11M',
|
||||||
antagonismDanger: 'm6m', // less character based
|
antagonismDanger: 'm6m', // less character based
|
||||||
antagonismEvil: 'm8m' // cahracter based
|
antagonismEvil: 'm8m' // character based
|
||||||
};
|
};
|
||||||
|
|
||||||
return musicScales;
|
return musicScales;
|
||||||
@ -945,7 +945,7 @@ edide.mmParserSpecial = (function (edide, mmParserSpecial) {Object.definePropert
|
|||||||
return endInd;
|
return endInd;
|
||||||
};
|
};
|
||||||
|
|
||||||
// parse variable from curren track row
|
// parse variable from current track row
|
||||||
// returns false if parsing fails
|
// returns false if parsing fails
|
||||||
this.var = (track, trackState) => {
|
this.var = (track, trackState) => {
|
||||||
var err, i, value, varLength, varName, varStr;
|
var err, i, value, varLength, varName, varStr;
|
||||||
@ -1039,7 +1039,7 @@ edide.mmParser = (function (edide, mmParser) {Object.defineProperty(this, 'modul
|
|||||||
if (isNaN(repeat = parseInt(track.slice(ts.i + 1)))) {
|
if (isNaN(repeat = parseInt(track.slice(ts.i + 1)))) {
|
||||||
ts.i++; // unable to parse number of repeats, skip them
|
ts.i++; // unable to parse number of repeats, skip them
|
||||||
} else {
|
} else {
|
||||||
// initialize new repeating patter (-1 because repeat pattern already played once)
|
// initialize new repeating pattern (-1 because repeat pattern already played once)
|
||||||
ts.repeat = repeat - 1;
|
ts.repeat = repeat - 1;
|
||||||
// search for beginning of repeat group
|
// search for beginning of repeat group
|
||||||
bef = track.slice(0, ts.i);
|
bef = track.slice(0, ts.i);
|
||||||
@ -1350,8 +1350,8 @@ edide.mmPipe = (function (edide, mmPipe) {Object.defineProperty(this, 'module_na
|
|||||||
revar.pipeReady = true;
|
revar.pipeReady = true;
|
||||||
return edide.onUnload(() => {
|
return edide.onUnload(() => {
|
||||||
if (dist != null) {
|
if (dist != null) {
|
||||||
if (typeof dist.dipose === "function") {
|
if (typeof dist.dispose === "function") {
|
||||||
dist.dipose();
|
dist.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (lowpass != null) {
|
if (lowpass != null) {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// For documentation see https://nodejs.org/api/buffer.html
|
// For documentation see https://nodejs.org/api/buffer.html
|
||||||
SEA.Buffer = SEA.Buffer || require('./buffer');
|
SEA.Buffer = SEA.Buffer || require('./buffer');
|
||||||
|
|
||||||
// These SEA functions support now ony Promises or
|
// These SEA functions support now only Promises or
|
||||||
// async/await (compatible) code, use those like Promises.
|
// async/await (compatible) code, use those like Promises.
|
||||||
//
|
//
|
||||||
// Creates a wrapper library around Web Crypto API
|
// Creates a wrapper library around Web Crypto API
|
||||||
@ -45,7 +45,7 @@
|
|||||||
// Obviously it is missing MANY necessary features. This is only an alpha release.
|
// Obviously it is missing MANY necessary features. This is only an alpha release.
|
||||||
// Please experiment with it, audit what I've done so far, and complain about what needs to be added.
|
// Please experiment with it, audit what I've done so far, and complain about what needs to be added.
|
||||||
// SEA should be a full suite that is easy and seamless to use.
|
// SEA should be a full suite that is easy and seamless to use.
|
||||||
// Again, scroll naer the top, where I provide an EXAMPLE of how to create a user and sign in.
|
// Again, scroll near the top, where I provide an EXAMPLE of how to create a user and sign in.
|
||||||
// Once logged in, the rest of the code you just read handled automatically signing/validating data.
|
// Once logged in, the rest of the code you just read handled automatically signing/validating data.
|
||||||
// But all other behavior needs to be equally easy, like opinionated ways of
|
// But all other behavior needs to be equally easy, like opinionated ways of
|
||||||
// Adding friends (trusted public keys), sending private messages, etc.
|
// Adding friends (trusted public keys), sending private messages, etc.
|
||||||
|
@ -3012,7 +3012,7 @@ describe('Gun', function(){
|
|||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
var gun2 = Gun();
|
var gun2 = Gun();
|
||||||
//console.log(require('fs').readFileSync('./radata/!').toString());
|
//console.log(require('fs').readFileSync('./radata/!').toString());
|
||||||
gun2.get('stef').get('address').once(function(data){ // Object {_: Object, country: "Netherlands", zip: "1766KP"} "adress"
|
gun2.get('stef').get('address').once(function(data){ // Object {_: Object, country: "Netherlands", zip: "1766KP"} "address"
|
||||||
//console.log("******", data);return;
|
//console.log("******", data);return;
|
||||||
done.a = true;
|
done.a = true;
|
||||||
expect(data.country).to.be('Netherlands');
|
expect(data.country).to.be('Netherlands');
|
||||||
|
@ -1660,7 +1660,7 @@ exports.colors = {
|
|||||||
exports.symbols = {
|
exports.symbols = {
|
||||||
ok: '?',
|
ok: '?',
|
||||||
err: '?',
|
err: '?',
|
||||||
dot: '·'
|
dot: '<EFBFBD>'
|
||||||
};
|
};
|
||||||
|
|
||||||
// With node.js on Windows: use symbols available in terminal default fonts
|
// With node.js on Windows: use symbols available in terminal default fonts
|
||||||
@ -1734,7 +1734,7 @@ exports.cursor = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Outut the given `failures` as a list.
|
* Output the given `failures` as a list.
|
||||||
*
|
*
|
||||||
* @param {Array} failures
|
* @param {Array} failures
|
||||||
* @api public
|
* @api public
|
||||||
@ -3000,9 +3000,9 @@ function Landing(runner) {
|
|||||||
stream.write('\u001b[' + (width + 1) + 'D\u001b[2A');
|
stream.write('\u001b[' + (width + 1) + 'D\u001b[2A');
|
||||||
stream.write(runway());
|
stream.write(runway());
|
||||||
stream.write('\n ');
|
stream.write('\n ');
|
||||||
stream.write(color('runway', Array(col).join('·')));
|
stream.write(color('runway', Array(col).join('<EFBFBD>')));
|
||||||
stream.write(plane);
|
stream.write(plane);
|
||||||
stream.write(color('runway', Array(width - col).join('·') + '\n'));
|
stream.write(color('runway', Array(width - col).join('<EFBFBD>') + '\n'));
|
||||||
stream.write(runway());
|
stream.write(runway());
|
||||||
stream.write('\u001b[0m');
|
stream.write('\u001b[0m');
|
||||||
});
|
});
|
||||||
@ -4731,7 +4731,7 @@ Runner.prototype.runTests = function(suite, fn) {
|
|||||||
}
|
}
|
||||||
if (!match) {
|
if (!match) {
|
||||||
// Run immediately only if we have defined a grep. When we
|
// Run immediately only if we have defined a grep. When we
|
||||||
// define a grep — It can cause maximum callstack error if
|
// define a grep <EFBFBD> It can cause maximum callstack error if
|
||||||
// the grep is doing a large recursive loop by neglecting
|
// the grep is doing a large recursive loop by neglecting
|
||||||
// all tests. The run immediately function also comes with
|
// all tests. The run immediately function also comes with
|
||||||
// a performance cost. So we don't want to run immediately
|
// a performance cost. So we don't want to run immediately
|
||||||
@ -8474,7 +8474,7 @@ process.nextTick = function (fun) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// v8 likes predictible objects
|
// v8 likes predictable objects
|
||||||
function Item(fun, array) {
|
function Item(fun, array) {
|
||||||
this.fun = fun;
|
this.fun = fun;
|
||||||
this.array = array;
|
this.array = array;
|
||||||
|
@ -100,7 +100,7 @@ describe('RAD Lexical search Test! ', function() {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('Query server - Beetween(< item <) ', function() {
|
it('Query server - Between(< item <) ', function() {
|
||||||
var i=0;
|
var i=0;
|
||||||
return server.run(function(test) {
|
return server.run(function(test) {
|
||||||
var env = test.props;
|
var env = test.props;
|
||||||
@ -118,7 +118,7 @@ describe('RAD Lexical search Test! ', function() {
|
|||||||
if (results_unique.length === len) {
|
if (results_unique.length === len) {
|
||||||
test.done();
|
test.done();
|
||||||
} else {
|
} else {
|
||||||
console.log('RESULTS Query server - Beetween(< item <): ', results_unique.length, results_unique.join(', '));
|
console.log('RESULTS Query server - Between(< item <): ', results_unique.length, results_unique.join(', '));
|
||||||
test.fail('Error: get ' + results_unique.length + ' attributes.');
|
test.fail('Error: get ' + results_unique.length + ' attributes.');
|
||||||
}
|
}
|
||||||
}, env.config.wait_map);
|
}, env.config.wait_map);
|
||||||
@ -146,7 +146,7 @@ describe('RAD Lexical search Test! ', function() {
|
|||||||
test.done();
|
test.done();
|
||||||
} else {
|
} else {
|
||||||
console.log('RESULTS Query server - Higher(>): ', results_unique.length, results_unique.join(', '));
|
console.log('RESULTS Query server - Higher(>): ', results_unique.length, results_unique.join(', '));
|
||||||
test.fail('Error: get ' + results_unique.length + ' attributes istead of '+len);
|
test.fail('Error: get ' + results_unique.length + ' attributes instead of '+len);
|
||||||
}
|
}
|
||||||
}, env.config.wait_map);
|
}, env.config.wait_map);
|
||||||
}, {
|
}, {
|
||||||
@ -173,7 +173,7 @@ describe('RAD Lexical search Test! ', function() {
|
|||||||
test.done();
|
test.done();
|
||||||
} else {
|
} else {
|
||||||
console.log('RESULTS Query server - Lower(<): ', results_unique.length, results_unique.join(', '));
|
console.log('RESULTS Query server - Lower(<): ', results_unique.length, results_unique.join(', '));
|
||||||
test.fail('Error: get ' + results_unique.length + ' attributes istead of '+len);
|
test.fail('Error: get ' + results_unique.length + ' attributes instead of '+len);
|
||||||
}
|
}
|
||||||
}, env.config.wait_map);
|
}, env.config.wait_map);
|
||||||
}, {
|
}, {
|
||||||
@ -200,7 +200,7 @@ describe('RAD Lexical search Test! ', function() {
|
|||||||
test.done();
|
test.done();
|
||||||
} else {
|
} else {
|
||||||
console.log('RESULTS Query server - Exact match(=): ', results_unique.length, results_unique.join(', '));
|
console.log('RESULTS Query server - Exact match(=): ', results_unique.length, results_unique.join(', '));
|
||||||
test.fail('Error: get ' + results_unique.length + ' attributes istead of '+len);
|
test.fail('Error: get ' + results_unique.length + ' attributes instead of '+len);
|
||||||
}
|
}
|
||||||
}, env.config.wait_map);
|
}, env.config.wait_map);
|
||||||
}, {
|
}, {
|
||||||
@ -227,7 +227,7 @@ describe('RAD Lexical search Test! ', function() {
|
|||||||
test.done();
|
test.done();
|
||||||
} else {
|
} else {
|
||||||
console.log('RESULTS Query server - Prefix match(*): ', results_unique.length, results_unique);
|
console.log('RESULTS Query server - Prefix match(*): ', results_unique.length, results_unique);
|
||||||
test.fail('Error: get ' + results_unique.length + ' attributes istead of '+len);
|
test.fail('Error: get ' + results_unique.length + ' attributes instead of '+len);
|
||||||
}
|
}
|
||||||
}, env.config.wait_map);
|
}, env.config.wait_map);
|
||||||
}, {
|
}, {
|
||||||
@ -281,7 +281,7 @@ describe('RAD Lexical search Test! ', function() {
|
|||||||
return Promise.all(tests);
|
return Promise.all(tests);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Query browser - Beetween(< item <) ', function() {
|
it('Query browser - Between(< item <) ', function() {
|
||||||
var tests = [], i = 0;
|
var tests = [], i = 0;
|
||||||
browsers.each(function(client, id) {
|
browsers.each(function(client, id) {
|
||||||
tests.push(client.run(function(test) {
|
tests.push(client.run(function(test) {
|
||||||
@ -300,8 +300,8 @@ describe('RAD Lexical search Test! ', function() {
|
|||||||
if (results_unique.length === len) {
|
if (results_unique.length === len) {
|
||||||
test.done();
|
test.done();
|
||||||
} else {
|
} else {
|
||||||
console.log('RESULTS Query browser - Beetween(< item <): ', results_unique.length, results_unique.join(', '));
|
console.log('RESULTS Query browser - Between(< item <): ', results_unique.length, results_unique.join(', '));
|
||||||
test.fail('Error: get ' + results_unique.length + ' attributes istead of '+len);
|
test.fail('Error: get ' + results_unique.length + ' attributes instead of '+len);
|
||||||
}
|
}
|
||||||
}, env.config.wait_map);
|
}, env.config.wait_map);
|
||||||
}, { i: i += 1, config: config }));
|
}, { i: i += 1, config: config }));
|
||||||
@ -328,7 +328,7 @@ describe('RAD Lexical search Test! ', function() {
|
|||||||
test.done();
|
test.done();
|
||||||
} else {
|
} else {
|
||||||
console.log('RESULTS Query browser - Higher(>): ', results_unique.length, results_unique.join(', '));
|
console.log('RESULTS Query browser - Higher(>): ', results_unique.length, results_unique.join(', '));
|
||||||
test.fail('Error: get ' + results_unique.length + ' attributes istead of '+len);
|
test.fail('Error: get ' + results_unique.length + ' attributes instead of '+len);
|
||||||
}
|
}
|
||||||
}, env.config.wait_map);
|
}, env.config.wait_map);
|
||||||
}, {
|
}, {
|
||||||
@ -358,7 +358,7 @@ describe('RAD Lexical search Test! ', function() {
|
|||||||
test.done();
|
test.done();
|
||||||
} else {
|
} else {
|
||||||
console.log('RESULTS Query browser - Lower(<): ', results_unique.length, results_unique.join(', '));
|
console.log('RESULTS Query browser - Lower(<): ', results_unique.length, results_unique.join(', '));
|
||||||
test.fail('Error: get ' + results_unique.length + ' attributes istead of '+len);
|
test.fail('Error: get ' + results_unique.length + ' attributes instead of '+len);
|
||||||
}
|
}
|
||||||
}, env.config.wait_map);
|
}, env.config.wait_map);
|
||||||
}, {
|
}, {
|
||||||
@ -388,7 +388,7 @@ describe('RAD Lexical search Test! ', function() {
|
|||||||
test.done();
|
test.done();
|
||||||
} else {
|
} else {
|
||||||
console.log('RESULTS Query browser - Exact match(=): ', results_unique.length, results_unique.join(', '));
|
console.log('RESULTS Query browser - Exact match(=): ', results_unique.length, results_unique.join(', '));
|
||||||
test.fail('Error: get ' + results_unique.length + ' attributes istead of '+len);
|
test.fail('Error: get ' + results_unique.length + ' attributes instead of '+len);
|
||||||
}
|
}
|
||||||
}, env.config.wait_map);
|
}, env.config.wait_map);
|
||||||
}, {
|
}, {
|
||||||
@ -418,7 +418,7 @@ describe('RAD Lexical search Test! ', function() {
|
|||||||
test.done();
|
test.done();
|
||||||
} else {
|
} else {
|
||||||
console.log('RESULTS Query browser - Prefix match(*): ', results_unique.length, results_unique);
|
console.log('RESULTS Query browser - Prefix match(*): ', results_unique.length, results_unique);
|
||||||
test.fail('Error: get ' + results_unique.length + ' attributes istead of '+len);
|
test.fail('Error: get ' + results_unique.length + ' attributes instead of '+len);
|
||||||
}
|
}
|
||||||
}, env.config.wait_map);
|
}, env.config.wait_map);
|
||||||
}, {
|
}, {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
;(function(window, undefined) {
|
;(function(window, undefined) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/** Used to assign each benchmark an incrimented id */
|
/** Used to assign each benchmark an incremented id */
|
||||||
var counter = 0;
|
var counter = 0;
|
||||||
|
|
||||||
/** Detect DOM document object */
|
/** Detect DOM document object */
|
||||||
@ -536,7 +536,7 @@
|
|||||||
*
|
*
|
||||||
* In Opera < 9.50 and some older/beta Mobile Safari versions using `unshift()`
|
* In Opera < 9.50 and some older/beta Mobile Safari versions using `unshift()`
|
||||||
* generically to augment the `arguments` object will pave the value at index 0
|
* generically to augment the `arguments` object will pave the value at index 0
|
||||||
* without incrimenting the other values's indexes.
|
* without incrementing the other values's indexes.
|
||||||
* https://github.com/documentcloud/underscore/issues/9
|
* https://github.com/documentcloud/underscore/issues/9
|
||||||
*
|
*
|
||||||
* Rhino and environments it powers, like Narwhal and RingoJS, may have
|
* Rhino and environments it powers, like Narwhal and RingoJS, may have
|
||||||
@ -963,7 +963,7 @@
|
|||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Function} fn The function.
|
* @param {Function} fn The function.
|
||||||
* @param {String} altSource A string used when a function's source code is unretrievable.
|
* @param {String} altSource A string used when a function's source code is irretrievable.
|
||||||
* @returns {String} The function's source code.
|
* @returns {String} The function's source code.
|
||||||
*/
|
*/
|
||||||
function getSource(fn, altSource) {
|
function getSource(fn, altSource) {
|
||||||
@ -2311,7 +2311,7 @@
|
|||||||
if (me == other) {
|
if (me == other) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// reject the null hyphothesis the two samples come from the
|
// reject the null hypothesis the two samples come from the
|
||||||
// same population (i.e. have the same median) if...
|
// same population (i.e. have the same median) if...
|
||||||
if (size1 + size2 > 30) {
|
if (size1 + size2 > 30) {
|
||||||
// ...the z-stat is greater than 1.96 or less than -1.96
|
// ...the z-stat is greater than 1.96 or less than -1.96
|
||||||
@ -2945,7 +2945,7 @@
|
|||||||
if (!clocked && (divisor = divisors[clone.cycles]) != null) {
|
if (!clocked && (divisor = divisors[clone.cycles]) != null) {
|
||||||
count = floor(4e6 / divisor);
|
count = floor(4e6 / divisor);
|
||||||
}
|
}
|
||||||
// calculate how many more iterations it will take to achive the `minTime`
|
// calculate how many more iterations it will take to archive the `minTime`
|
||||||
if (count <= clone.count) {
|
if (count <= clone.count) {
|
||||||
count += Math.ceil((minTime - clocked) / period);
|
count += Math.ceil((minTime - clocked) / period);
|
||||||
}
|
}
|
||||||
|
@ -658,7 +658,7 @@ describe('SEA', function(){
|
|||||||
var alice = await SEA.pair()
|
var alice = await SEA.pair()
|
||||||
var bob = await SEA.pair()
|
var bob = await SEA.pair()
|
||||||
var cert = await SEA.certify(bob, {"*": "private"}, alice, null, {
|
var cert = await SEA.certify(bob, {"*": "private"}, alice, null, {
|
||||||
expiry: Gun.state() - 100, // expired 100 miliseconds ago
|
expiry: Gun.state() - 100, // expired 100 milliseconds ago
|
||||||
})
|
})
|
||||||
|
|
||||||
user.leave()
|
user.leave()
|
||||||
|
@ -237,7 +237,7 @@ Gun().user && describe('Gun', function(){
|
|||||||
var pass = 'my secret password';
|
var pass = 'my secret password';
|
||||||
var gun = Gun();
|
var gun = Gun();
|
||||||
var user = gun.user();
|
var user = gun.user();
|
||||||
Gun.log.off = true; // Supress all console logging
|
Gun.log.off = true; // Suppress all console logging
|
||||||
|
|
||||||
const throwOutUser = (wipeStorageData, done) => {
|
const throwOutUser = (wipeStorageData, done) => {
|
||||||
// Get rid of authenticated Gun user
|
// Get rid of authenticated Gun user
|
||||||
@ -282,7 +282,7 @@ Gun().user && describe('Gun', function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('conflict', function(done){
|
it('conflict', function(done){
|
||||||
Gun.log.off = true; // Supress all console logging
|
Gun.log.off = true; // Suppress all console logging
|
||||||
var check = function(ack){
|
var check = function(ack){
|
||||||
try{
|
try{
|
||||||
expect(ack).to.not.be(undefined);
|
expect(ack).to.not.be(undefined);
|
||||||
@ -972,7 +972,7 @@ Gun().user && describe('Gun', function(){
|
|||||||
expect(usr).to.not.have.key('err');
|
expect(usr).to.not.have.key('err');
|
||||||
expect(usr).to.have.key('put');
|
expect(usr).to.have.key('put');
|
||||||
}catch(e){ done(e); return }
|
}catch(e){ done(e); return }
|
||||||
// Gun.user.alive - keeps/checks User authentiation state
|
// Gun.user.alive - keeps/checks User authentication state
|
||||||
user.alive().then(check).catch(done);
|
user.alive().then(check).catch(done);
|
||||||
}).catch(done);
|
}).catch(done);
|
||||||
}).catch(done);
|
}).catch(done);
|
||||||
|
@ -34,7 +34,7 @@ var server = h.createServer((req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//TODO-GUN put this into a seperate require
|
//TODO-GUN put this into a separate require
|
||||||
function hijack(cb) {
|
function hijack(cb) {
|
||||||
/* Intercept outgoing message and replace result with
|
/* Intercept outgoing message and replace result with
|
||||||
result from cb({soul, key, msg, original})
|
result from cb({soul, key, msg, original})
|
||||||
|
2
types/sea/ISEA.d.ts
vendored
2
types/sea/ISEA.d.ts
vendored
@ -152,7 +152,7 @@ export interface ISEA {
|
|||||||
* Derive shared secret from other's pub and my epub/epriv
|
* Derive shared secret from other's pub and my epub/epriv
|
||||||
*
|
*
|
||||||
* @param key other's public encryption key
|
* @param key other's public encryption key
|
||||||
* @param pair encyption key pair from `.pair`
|
* @param pair encryption key pair from `.pair`
|
||||||
* @param callback A callback function that runs after a secret is created
|
* @param callback A callback function that runs after a secret is created
|
||||||
*/
|
*/
|
||||||
secret(
|
secret(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user