core-3nweb-client-lib 0.35.4 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -219,15 +219,14 @@ var extAttrs;
219
219
  }
220
220
  function packNamedStrAttr(name, value) {
221
221
  (0, assert_1.assert)((typeof name === 'string') && (name.length > 0) &&
222
- (typeof value === 'string') && (value.length > 0));
222
+ (typeof value === 'string'));
223
223
  const nameBin = Buffer.from(name, 'utf8');
224
224
  const valueBin = Buffer.from(value, 'utf8');
225
225
  return packNamedAttr(NAMED_UTF8_STR, nameBin, valueBin);
226
226
  }
227
227
  extAttrs.packNamedStrAttr = packNamedStrAttr;
228
228
  function packNamedBinaryAttr(name, value) {
229
- (0, assert_1.assert)((typeof name === 'string') && (name.length > 0) &&
230
- (value.length > 0));
229
+ (0, assert_1.assert)((typeof name === 'string') && (name.length > 0));
231
230
  const nameBin = Buffer.from(name, 'utf8');
232
231
  return packNamedAttr(NAMED_BINARY, nameBin, value);
233
232
  }
@@ -304,27 +303,6 @@ var extAttrs;
304
303
  (0, assert_1.assert)(false);
305
304
  }
306
305
  }
307
- // export function pack(xattrs: XAttrs): Buffer {
308
- // const ext: Buffer[] = [];
309
- // for (const xattr of Object.values(xattrs)) {
310
- // if (xattr.type === 'named-utf8str') {
311
- // ext.push(packNamedStrAttr(xattr.name, xattr.value));
312
- // } else if (xattr.type === 'named-json') {
313
- // ext.push(packNamedJsonAttr(xattr.name, xattr.value));
314
- // } else if (xattr.type === 'named-binary') {
315
- // ext.push(packNamedBinaryAttr(xattr.name, xattr.value));
316
- // } else {
317
- // throw new Error(`Unknown type of named attribute`);
318
- // }
319
- // }
320
- // const bytes = Buffer.allocUnsafe(ext.reduce((len, b) => len+b.length, 0));
321
- // let ofs = 0;
322
- // for (const buf of ext) {
323
- // bytes.set(buf, ofs);
324
- // ofs += buf.length;
325
- // }
326
- // return bytes;
327
- // }
328
306
  })(extAttrs || (extAttrs = {}));
329
307
  Object.freeze(extAttrs);
330
308
  function parsingException(msg, cause) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-3nweb-client-lib",
3
- "version": "0.35.4",
3
+ "version": "0.36.0",
4
4
  "description": "3NWeb client core library, embeddable into different environments",
5
5
  "main": "build/lib-index.js",
6
6
  "types": "build/lib-index.d.ts",