Sha256: a9636b5ef20faea545480b3fc9aaaa8f1265eb78fb53ad654b91f52be08b6b5e

Contents?: true

Size: 665 Bytes

Versions: 1

Compression:

Stored size: 665 Bytes

Contents

"use strict";

const fileSymbols = require("./file-symbols");
const Blob = require("./blob");

module.exports = class File extends Blob {
  constructor(fileBits, fileName) {
    super(fileBits, arguments[2]);
    if (!(this instanceof File)) {
      throw new TypeError("DOM object constructor cannot be called as a function.");
    }
    const options = arguments[2];
    this[fileSymbols.name] = fileName.replace(/\//g, ":");
    this[fileSymbols.lastModified] = options && options.lastModified ? options.lastModified : Date.now();
  }
  get name() {
    return this[fileSymbols.name];
  }
  get lastModified() {
    return this[fileSymbols.lastModified];
  }
};

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
select_all-rails-0.3.1 node_modules/jsdom/lib/jsdom/living/file.js