@loaders.gl/bson
Advanced tools
Comparing version 3.4.14 to 3.4.15
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -8,13 +7,8 @@ value: true | ||
exports.BSONLoader = void 0; | ||
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); | ||
var _parseBson = require("./lib/parsers/parse-bson"); | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
var VERSION = typeof "3.4.14" !== 'undefined' ? "3.4.14" : 'latest'; | ||
var DEFAULT_BSON_LOADER_OPTIONS = { | ||
const VERSION = typeof "3.4.15" !== 'undefined' ? "3.4.15" : 'latest'; | ||
const DEFAULT_BSON_LOADER_OPTIONS = { | ||
bson: {} | ||
}; | ||
var BSONLoader = { | ||
const BSONLoader = { | ||
name: 'BSON', | ||
@@ -28,30 +22,21 @@ id: 'bson', | ||
binary: true, | ||
parse: parse, | ||
parseSync: parseSync, | ||
parse, | ||
parseSync, | ||
options: DEFAULT_BSON_LOADER_OPTIONS | ||
}; | ||
exports.BSONLoader = BSONLoader; | ||
function parse(_x, _x2) { | ||
return _parse.apply(this, arguments); | ||
async function parse(arrayBuffer, options) { | ||
const bsonOptions = { | ||
...DEFAULT_BSON_LOADER_OPTIONS.bson, | ||
...(options === null || options === void 0 ? void 0 : options.bson) | ||
}; | ||
return (0, _parseBson.parseBSONSync)(arrayBuffer, bsonOptions); | ||
} | ||
function _parse() { | ||
_parse = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee(arrayBuffer, options) { | ||
var bsonOptions; | ||
return _regenerator.default.wrap(function _callee$(_context) { | ||
while (1) switch (_context.prev = _context.next) { | ||
case 0: | ||
bsonOptions = _objectSpread(_objectSpread({}, DEFAULT_BSON_LOADER_OPTIONS.bson), options === null || options === void 0 ? void 0 : options.bson); | ||
return _context.abrupt("return", (0, _parseBson.parseBSONSync)(arrayBuffer, bsonOptions)); | ||
case 2: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
}, _callee); | ||
})); | ||
return _parse.apply(this, arguments); | ||
} | ||
function parseSync(arrayBuffer, options) { | ||
var bsonOptions = _objectSpread(_objectSpread({}, DEFAULT_BSON_LOADER_OPTIONS.bson), options === null || options === void 0 ? void 0 : options.bson); | ||
const bsonOptions = { | ||
...DEFAULT_BSON_LOADER_OPTIONS.bson, | ||
...(options === null || options === void 0 ? void 0 : options.bson) | ||
}; | ||
return (0, _parseBson.parseBSONSync)(arrayBuffer, bsonOptions); | ||
} | ||
//# sourceMappingURL=bson-loader.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -8,7 +7,5 @@ value: true | ||
exports.BSONWriter = void 0; | ||
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); | ||
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); | ||
var _encodeBson = require("./lib/encoders/encode-bson"); | ||
var VERSION = typeof "3.4.14" !== 'undefined' ? "3.4.14" : 'latest'; | ||
var BSONWriter = { | ||
const VERSION = typeof "3.4.15" !== 'undefined' ? "3.4.15" : 'latest'; | ||
const BSONWriter = { | ||
name: 'BSON', | ||
@@ -24,16 +21,6 @@ id: 'bson', | ||
}, | ||
encode: function encode(data, options) { | ||
return (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee() { | ||
return _regenerator.default.wrap(function _callee$(_context) { | ||
while (1) switch (_context.prev = _context.next) { | ||
case 0: | ||
return _context.abrupt("return", (0, _encodeBson.encodeBSONSync)(data, {})); | ||
case 1: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
}, _callee); | ||
}))(); | ||
async encode(data, options) { | ||
return (0, _encodeBson.encodeBSONSync)(data, {}); | ||
}, | ||
encodeSync: function encodeSync(data, options) { | ||
encodeSync(data, options) { | ||
return (0, _encodeBson.encodeBSONSync)(data, {}); | ||
@@ -40,0 +27,0 @@ } |
"use strict"; | ||
var moduleExports = require('./index'); | ||
const moduleExports = require('./index'); | ||
globalThis.loaders = globalThis.loaders || {}; | ||
module.exports = Object.assign(globalThis.loaders, moduleExports); | ||
//# sourceMappingURL=bundle.js.map |
@@ -8,3 +8,3 @@ "use strict"; | ||
enumerable: true, | ||
get: function get() { | ||
get: function () { | ||
return _bsonLoader.BSONLoader; | ||
@@ -15,3 +15,3 @@ } | ||
enumerable: true, | ||
get: function get() { | ||
get: function () { | ||
return _bsonWriter.BSONWriter; | ||
@@ -18,0 +18,0 @@ } |
@@ -9,5 +9,5 @@ "use strict"; | ||
function encodeBSONSync(value, options) { | ||
var uint8Array = (0, _bson.serialize)(value); | ||
const uint8Array = (0, _bson.serialize)(value); | ||
return uint8Array.buffer; | ||
} | ||
//# sourceMappingURL=encode-bson.js.map |
@@ -9,5 +9,5 @@ "use strict"; | ||
function parseBSONSync(value, options) { | ||
var parsedData = (0, _bson.deserialize)(new Uint8Array(value), options); | ||
const parsedData = (0, _bson.deserialize)(new Uint8Array(value), options); | ||
return parsedData; | ||
} | ||
//# sourceMappingURL=parse-bson.js.map |
import { parseBSONSync } from './lib/parsers/parse-bson'; | ||
const VERSION = typeof "3.4.14" !== 'undefined' ? "3.4.14" : 'latest'; | ||
const VERSION = typeof "3.4.15" !== 'undefined' ? "3.4.15" : 'latest'; | ||
const DEFAULT_BSON_LOADER_OPTIONS = { | ||
@@ -4,0 +4,0 @@ bson: {} |
import { encodeBSONSync } from './lib/encoders/encode-bson'; | ||
const VERSION = typeof "3.4.14" !== 'undefined' ? "3.4.14" : 'latest'; | ||
const VERSION = typeof "3.4.15" !== 'undefined' ? "3.4.15" : 'latest'; | ||
export const BSONWriter = { | ||
@@ -4,0 +4,0 @@ name: 'BSON', |
{ | ||
"name": "@loaders.gl/bson", | ||
"version": "3.4.14", | ||
"version": "3.4.15", | ||
"description": "Framework-independent loader for JSON and streaming JSON formats", | ||
@@ -37,9 +37,9 @@ "license": "MIT", | ||
"dependencies": { | ||
"@loaders.gl/gis": "3.4.14", | ||
"@loaders.gl/loader-utils": "3.4.14", | ||
"@loaders.gl/schema": "3.4.14", | ||
"@loaders.gl/gis": "3.4.15", | ||
"@loaders.gl/loader-utils": "3.4.15", | ||
"@loaders.gl/schema": "3.4.15", | ||
"@types/bson": "4.2.0", | ||
"bson": "4.2.0" | ||
}, | ||
"gitHead": "dffa197c6ae79bac5277d5e8a132f4cd274e74e5" | ||
"gitHead": "19e941d5805568e449ef9092490d6568a4853298" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
280276
6145
1
+ Added@loaders.gl/gis@3.4.15(transitive)
+ Added@loaders.gl/loader-utils@3.4.15(transitive)
+ Added@loaders.gl/schema@3.4.15(transitive)
+ Added@loaders.gl/worker-utils@3.4.15(transitive)
+ Added@probe.gl/stats@3.6.0(transitive)
- Removed@loaders.gl/gis@3.4.14(transitive)
- Removed@loaders.gl/loader-utils@3.4.14(transitive)
- Removed@loaders.gl/schema@3.4.14(transitive)
- Removed@loaders.gl/worker-utils@3.4.14(transitive)
- Removed@probe.gl/stats@4.0.9(transitive)
Updated@loaders.gl/gis@3.4.15
Updated@loaders.gl/schema@3.4.15