Comparing version 1.3.7 to 1.4.0
@@ -10,2 +10,4 @@ "use strict"; | ||
var _queueMicrotask = _interopRequireDefault(require("queue-microtask")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -490,5 +492,3 @@ | ||
if (typeof callback === 'function') setImmediate(function () { | ||
self._tokenizeToEnd(callback, true); | ||
}); // If no callback was passed, tokenize synchronously and return | ||
if (typeof callback === 'function') (0, _queueMicrotask.default)(() => self._tokenizeToEnd(callback, true)); // If no callback was passed, tokenize synchronously and return | ||
else { | ||
@@ -495,0 +495,0 @@ var tokens = [], |
{ | ||
"name": "n3", | ||
"version": "1.3.7", | ||
"version": "1.4.0", | ||
"description": "Lightning fast, asynchronous, streaming Turtle / N3 / RDF library.", | ||
@@ -45,3 +45,3 @@ "author": "Ruben Verborgh <ruben.verborgh@gmail.com>", | ||
"test": "nyc npm run mocha", | ||
"mocha": "mocha --require @babel/register", | ||
"mocha": "mocha", | ||
"lint": "eslint src perf test spec", | ||
@@ -72,3 +72,6 @@ "prepare": "npm run build", | ||
"test" | ||
] | ||
], | ||
"dependencies": { | ||
"queue-microtask": "^1.1.2" | ||
} | ||
} |
@@ -49,4 +49,2 @@ # Lightning fast, asynchronous, streaming RDF for JavaScript | ||
> **Note:** In some browser environments you may need to include a shim for the [setImmediate](https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate) method. | ||
## Creating triples/quads | ||
@@ -53,0 +51,0 @@ N3.js follows the [RDF.js low-level specification](http://rdf.js.org/). |
// **N3Lexer** tokenizes N3 documents. | ||
import namespaces from './IRIs'; | ||
import queueMicrotask from 'queue-microtask'; | ||
const { xsd } = namespaces; | ||
const { fromCharCode } = String; | ||
@@ -440,3 +441,3 @@ | ||
if (typeof callback === 'function') | ||
setImmediate(function () { self._tokenizeToEnd(callback, true); }); | ||
queueMicrotask(() => self._tokenizeToEnd(callback, true)); | ||
// If no callback was passed, tokenize synchronously and return | ||
@@ -443,0 +444,0 @@ else { |
249888
1
373
+ Addedqueue-microtask@^1.1.2
+ Addedqueue-microtask@1.2.3(transitive)