json is lame

This commit is contained in:
Mark Nadal 2022-03-11 05:17:01 -08:00
parent 2bbbe36e13
commit c4a613a971
4 changed files with 5 additions and 4 deletions

View File

@ -23,7 +23,7 @@ yson.parseAsync = function(text, done, revive, M){
}
if(w){
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;
if('"' == c && !tmp){
w = u;

View File

@ -1,6 +1,6 @@
{
"name": "gun",
"version": "0.2020.1235",
"version": "0.2020.1236",
"description": "A realtime, decentralized, offline-first, graph data synchronization engine.",
"types": "index.d.ts",
"main": "index.js",

View File

@ -70,7 +70,7 @@ describe('Gun', function(){
} );
*/
describe.only('YSON', function(){
describe('YSON', function(){
it('parse', function(){
//var json = require('fs').readFileSync('./radix.json').toString();
//var json = require('fs').readFileSync('./data.json').toString();

View File

@ -1,5 +1,6 @@
var ip; try{ foo; ip = require('ip').address() }catch(e){}
var config = {
IP: require('ip').address(),
IP: ip || 'localhost',
port: 8765,
servers: 1,
browsers: 2, //3,