mirror of
https://github.com/amark/gun.git
synced 2025-06-07 22:56:42 +00:00
json is lame
This commit is contained in:
parent
2bbbe36e13
commit
c4a613a971
@ -23,7 +23,7 @@ yson.parseAsync = function(text, done, revive, M){
|
|||||||
}
|
}
|
||||||
if(w){
|
if(w){
|
||||||
i = s.indexOf('"', i-1); c = s[i];
|
i = s.indexOf('"', i-1); c = s[i];
|
||||||
tmp = ('\\' == s[i-1] && '\\' != s[i-2]);
|
tmp = 0; while('\\' == s[i-(++tmp)]){}; tmp = !(tmp % 2);//tmp = ('\\' == s[i-1]); // json is stupid
|
||||||
b = b || tmp;
|
b = b || tmp;
|
||||||
if('"' == c && !tmp){
|
if('"' == c && !tmp){
|
||||||
w = u;
|
w = u;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gun",
|
"name": "gun",
|
||||||
"version": "0.2020.1235",
|
"version": "0.2020.1236",
|
||||||
"description": "A realtime, decentralized, offline-first, graph data synchronization engine.",
|
"description": "A realtime, decentralized, offline-first, graph data synchronization engine.",
|
||||||
"types": "index.d.ts",
|
"types": "index.d.ts",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
@ -70,7 +70,7 @@ describe('Gun', function(){
|
|||||||
} );
|
} );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
describe.only('YSON', function(){
|
describe('YSON', function(){
|
||||||
it('parse', function(){
|
it('parse', function(){
|
||||||
//var json = require('fs').readFileSync('./radix.json').toString();
|
//var json = require('fs').readFileSync('./radix.json').toString();
|
||||||
//var json = require('fs').readFileSync('./data.json').toString();
|
//var json = require('fs').readFileSync('./data.json').toString();
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
var ip; try{ foo; ip = require('ip').address() }catch(e){}
|
||||||
var config = {
|
var config = {
|
||||||
IP: require('ip').address(),
|
IP: ip || 'localhost',
|
||||||
port: 8765,
|
port: 8765,
|
||||||
servers: 1,
|
servers: 1,
|
||||||
browsers: 2, //3,
|
browsers: 2, //3,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user