PHP 8.2.30
Preview: utils.js Size: 723 B
/home/byroehnu/.trash/node_modules11/restructure/src/utils.js

import {Number as NumberT} from './Number.js';

export function resolveLength(length, stream, parent) {
  let res;
  if (typeof length === 'number') {
    res = length;

  } else if (typeof length === 'function') {
    res = length.call(parent, parent);

  } else if (parent && (typeof length === 'string')) {
    res = parent[length];

  } else if (stream && length instanceof NumberT) {
    res = length.decode(stream);
  }

  if (isNaN(res)) {
    throw new Error('Not a fixed size');
  }

  return res;
};

export class PropertyDescriptor {
  constructor(opts = {}) {
    this.enumerable = true;
    this.configurable = true;

    for (let key in opts) {
      const val = opts[key];
      this[key] = val;
    }
  }
}

Directory Contents

Dirs: 0 × Files: 17

Name Size Perms Modified Actions
2.43 KB lrw-r--r-- 2026-02-14 19:19:14
Edit Download
412 B lrw-r--r-- 2026-02-14 19:19:14
Edit Download
741 B lrw-r--r-- 2026-02-14 19:19:14
Edit Download
398 B lrw-r--r-- 2026-02-14 19:19:16
Edit Download
795 B lrw-r--r-- 2026-02-14 19:19:16
Edit Download
1.85 KB lrw-r--r-- 2026-02-14 19:19:16
Edit Download
3.13 KB lrw-r--r-- 2026-02-14 19:19:16
Edit Download
533 B lrw-r--r-- 2026-02-14 19:19:16
Edit Download
1.62 KB lrw-r--r-- 2026-02-14 19:19:18
Edit Download
2.23 KB lrw-r--r-- 2026-02-14 19:19:18
Edit Download
920 B lrw-r--r-- 2026-02-14 19:19:18
Edit Download
4.09 KB lrw-r--r-- 2026-02-14 19:19:18
Edit Download
519 B lrw-r--r-- 2026-02-14 19:19:18
Edit Download
3.71 KB lrw-r--r-- 2026-02-14 19:19:18
Edit Download
2.33 KB lrw-r--r-- 2026-02-14 19:19:18
Edit Download
723 B lrw-r--r-- 2026-02-14 19:19:18
Edit Download
3.01 KB lrw-r--r-- 2026-02-14 19:19:18
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).