Comparing version 1.0.0 to 1.0.1
@@ -81,6 +81,10 @@ 'use strict'; | ||
var digitsNoLeadingZero = _bennu.parse.enumeration(_bennu.text.oneOf('123456789'), _bennu.parse.many(_bennu.text.digit)).map(function (s) { | ||
return _nuStream.stream.cons(_nuStream.stream.first(s), _nuStream.stream.first(_nuStream.stream.rest(s))); | ||
}); | ||
// Custom implementation of number. Not completely accurate for floating point! | ||
var CUSTOMnumber = _bennu.parse.enumeration(opt(_bennu.text.character('-')), _bennu.parse.enumeration(_bennu.parse.choice(_bennu.text.character('0').map(function () { | ||
return 0; | ||
}), _bennu.parse.many1(_bennu.text.oneOf('123456789')).map(readDigits)), opt(_bennu.parse.next(_bennu.text.character('.'), _bennu.parse.many1(_bennu.text.digit))), opt(_bennu.parse.next(_bennu.text.oneOf('eE'), _bennu.parse.enumeration(opt(_bennu.text.oneOf('+-')), _bennu.parse.many1(_bennu.text.digit).map(readDigits)).map(applySign)))).map(function (s) { | ||
}), digitsNoLeadingZero.map(readDigits)), opt(_bennu.parse.next(_bennu.text.character('.'), _bennu.parse.many1(_bennu.text.digit))), opt(_bennu.parse.next(_bennu.text.oneOf('eE'), _bennu.parse.enumeration(opt(_bennu.text.oneOf('+-')), _bennu.parse.many1(_bennu.text.digit).map(readDigits)).map(applySign)))).map(function (s) { | ||
var value = _nuStream.stream.first(s); | ||
@@ -113,3 +117,3 @@ var fracS = _nuStream.stream.rest(s); | ||
// interpret it so we get accurate floating point values. | ||
var NATIVEnumber = _bennu.parse.enumeration(opt(_bennu.text.character('-')), _bennu.parse.choice(_bennu.text.character('0'), _bennu.parse.many1(_bennu.text.oneOf('123456789'))), opt(_bennu.parse.enumeration(_bennu.text.character('.'), _bennu.parse.many1(_bennu.text.digit))), opt(_bennu.parse.enumeration(_bennu.text.oneOf('eE'), _bennu.parse.enumeration(opt(_bennu.text.oneOf('+-')), _bennu.parse.many1(_bennu.text.digit))))).map(deepConcat).map(Number); | ||
var NATIVEnumber = _bennu.parse.enumeration(opt(_bennu.text.character('-')), _bennu.parse.choice(_bennu.text.character('0'), digitsNoLeadingZero), opt(_bennu.parse.enumeration(_bennu.text.character('.'), _bennu.parse.many1(_bennu.text.digit))), opt(_bennu.parse.enumeration(_bennu.text.oneOf('eE'), _bennu.parse.enumeration(opt(_bennu.text.oneOf('+-')), _bennu.parse.many1(_bennu.text.digit))))).map(deepConcat).map(Number); | ||
@@ -145,2 +149,2 @@ var number = exports.number = _bennu.parse.label('number', NATIVEnumber); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7OztBQUdBLFNBQVMsUUFBVCxDQUFrQixJQUFsQixFQUF3QixJQUF4QixFQUE4QixNQUE5QixFQUFzQyxLQUF0QyxFQUE2QztBQUMzQyxTQUFPLGFBQU0sSUFBTixDQUNMLGFBQU0sSUFBTixDQUFXLElBQVgsRUFBaUIsT0FBakIsQ0FESyxFQUVMLFlBQUssSUFBTCxDQUNFLFlBQUssS0FBTCxDQUFXLGFBQU0sSUFBTixDQUFXLE1BQVgsRUFBbUIsT0FBbkIsQ0FBWCxFQUF3QyxZQUFLLElBQUwsQ0FBVSxJQUFWLEVBQWdCLE9BQWhCLENBQXhDLENBREYsRUFFRSxLQUZGLENBRkssQ0FBUCxDQUQyQztDQUE3Qzs7QUFVQSxTQUFTLFVBQVQsQ0FBb0IsQ0FBcEIsRUFBdUI7QUFDckIsU0FBTyxpQkFBTyxLQUFQLENBQ0wsVUFBQyxLQUFELEVBQVEsR0FBUjtXQUFnQixRQUFNLEVBQU4sR0FBUyxTQUFTLEdBQVQsRUFBYyxFQUFkLENBQVQ7R0FBaEIsRUFDQSxDQUZLLEVBR0wsQ0FISyxDQUFQLENBRHFCO0NBQXZCOztBQVFBLFNBQVMsU0FBVCxDQUFtQixDQUFuQixFQUFzQjtBQUNwQix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gICAgIHRleHQuY2hhcmFjdGVyKCdyJykubWFwKCgpID0+ICdcXHInKSxcbiAgICAgICAgICAgIHRleHQuY2hhcmFjdGVyKCd0JykubWFwKCgpID0+ICdcXHQnKSxcbiAgICAgICAgICAgIHBhcnNlLm5leHQoXG4gICAgICAgICAgICAgIHRleHQuY2hhcmFjdGVyKCd1JyksXG4gICAgICAgICAgICAgIGxhbmcudGltZXMoNCwgdGV4dC5vbmVPZignMDEyMzQ1Njc4OWFiY2RlZkFCQ0RFRicpKVxuICAgICAgICAgICAgICAgIC5tYXAoY29uY2F0KVxuICAgICAgICAgICAgICAgIC5tYXAocyA9PiBwYXJzZUludChzLCAxNikpXG4gICAgICAgICAgICAgICAgLm1hcChTdHJpbmcuZnJvbUNvZGVQb2ludClcbiAgICAgICAgICAgIClcbiAgICAgICAgICApXG4gICAgICAgIClcbiAgICAgICkpLm1hcChjb25jYXQpLFxuICAgICAgdGV4dC5jaGFyYWN0ZXIoJ1wiJylcbiAgICApXG4gIClcblxuLy8gQ3VzdG9tIGltcGxlbWVudGF0aW9uIG9mIG51bWJlci4gTm90IGNvbXBsZXRlbHkgYWNjdXJhdGUgZm9yIGZsb2F0aW5nIHBvaW50IVxuY29uc3QgQ1VTVE9NbnVtYmVyID0gcGFyc2UuZW51bWVyYXRpb24oXG4gICAgb3B0KHRleHQuY2hhcmFjdGVyKCctJykpLFxuICAgIHBhcnNlLmVudW1lcmF0aW9uKFxuICAgICAgcGFyc2UuY2hvaWNlKFxuICAgICAgICB0ZXh0LmNoYXJhY3RlcignMCcpLm1hcCgoKSA9PiAwKSxcbiAgICAgICAgcGFyc2UubWFueTEodGV4dC5vbmVPZignMTIzNDU2Nzg5JykpLm1hcChyZWFkRGlnaXRzKVxuICAgICAgKSxcbiAgICAgIG9wdChwYXJzZS5uZXh0KHRleHQuY2hhcmFjdGVyKCcuJyksIHBhcnNlLm1hbnkxKHRleHQuZGlnaXQpKSksXG4gICAgICBvcHQoXG4gICAgICAgIHBhcnNlL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XJzZS5uZXh0KHRleHQuY2hhcmFjdGVyKCcuJyksIHBhcnNlLm1hbnkxKHRleHQuZGlnaXQpKSksXG4gICAgICBvcHQoXG4gICAgICAgIHBhcnNlLm5leHQoXG4gICAgICAgICAgdGV4dC5vbmVPZignZUUnKSxcbiAgICAgICAgICBwYXJzZS5lbnVtZXJhdGlvbihcbiAgICAgICAgICAgIG9wdCh0ZXh0Lm9uZU9mKCcrLScpKSxcbiAgICAgICAgICAgIHBhcnNlLm1hbnkxKHRleHQuZGlnaXQpLm1hcChyZWFkRGlnaXRzKVxuICAgICAgICAgICkubWFwKGFwcGx5U2lnbilcbiAgICAgICAgKVxuICAgICAgKVxuICAgIClcbiAgICAubWFwKHMgPT4ge1xuICAgICAgbGV0IHZhbHVlID0gc3RyZWFtLmZpcnN0KHMpO1xuICAgICAgY29uc3QgZnJhY1MgPSBzdHJlYW0ucmVzdChzKTtcblxuICAgICAgY29uc3QgZnJhY1N0cmVhbSA9IHN0cmVhbS5maXJzdChmcmFjUyk7XG4gICAgICBpZiAoZnJhY1N0cmVhbSkge1xuICAgICAgICBsZXQgZnJhY1ZhbHVlID0gMDtcbiAgICAgICAgbGV0IHBvcyA9IC0xO1xuICAgICAgICBzdHJlYW0uZm9yRWFjaChzdHIgPT4ge1xuICAgICAgICAgIGZyYWNWYWx1ZSArPSBwYXJzZUludChzdHIpICogTWF0aC5wb3coMTAsIHBvcy0tKTtcbiAgICAgICAgfSwgZnJhY1N0cmVhbSk7XG4gICAgICAgIHZhbHVlICs9IGZyYWNWYWx1ZTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZVMgPSBzdHJlYW0ucmVzdChmcmFjUyk7XG4gICAgICBjb25zdCBleHBvbmVudCA9IHN0cmVhbS5maXJzdChlUyk7XG4gICAgICBpZiAoZXhwb25lbnQgIT0gbnVsbCkge1xuICAgICAgICB2YWx1ZSAqPSBNYXRoLnBvdygxMCwgZXhwb25lbnQpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4g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IGZhbHNlKTtcbmV4cG9ydCBjb25zdCB0b2tlbl9udWxsID0gdGV4dC5zdHJpbmcoJ251bGwnKS5tYXAoKCkgPT4gbnVsbCk7XG4iXX0= |
{ | ||
"name": "bennu-json", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A JSON parser for Bennu.", | ||
@@ -5,0 +5,0 @@ "main": "js/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23469
127