Blue Sky JS
Blue Sky JS is a JavaScript sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
01-blue-sky.js7d3b2994ee0a1c9c28837d0ba8de3ec918b7820baa1291e49ef20c85c9a343ffCode
JavaScript is a code format commonly identified by .js, .mjs, .cjs. Use the listed signatures, MIME types, and structure notes to validate files beyond the extension.
65 78 70 6F 72 74 exportSIGNATURE = bytes.fromhex("6578706f7274")
OFFSET = 0
def is_js(path: str) -> bool:
with open(path, "rb") as f:
f.seek(OFFSET)
head = f.read(len(SIGNATURE))
return head == SIGNATUREconst SIGNATURE = [0x65, 0x78, 0x70, 0x6f, 0x72, 0x74];
const OFFSET = 0;
// bytes: a Uint8Array / Buffer holding the start of the file
export function isJs(bytes) {
return SIGNATURE.every((byte, i) => bytes[OFFSET + i] === byte);
}package fileid
import "bytes"
var isjsSignature = []byte{0x65, 0x78, 0x70, 0x6f, 0x72, 0x74}
const isjsOffset = 0
func IsJs(b []byte) bool {
end := isjsOffset + len(isjsSignature)
if len(b) < end {
return false
}
return bytes.Equal(b[isjsOffset:end], isjsSignature)
}const SIGNATURE: &[u8] = &[0x65, 0x78, 0x70, 0x6f, 0x72, 0x74];
const OFFSET: usize = 0;
fn is_js(bytes: &[u8]) -> bool {
bytes.get(OFFSET..OFFSET + SIGNATURE.len()) == Some(SIGNATURE)
}<?php
$signature = "\x65\x78\x70\x6f\x72\x74";
$offset = 0;
function is_js(string $bytes): bool {
global $signature, $offset;
return substr($bytes, $offset, strlen($signature)) === $signature;
}JavaScript is used for data exchange, imports, exports, parser testing, and validation workflows. Encoding, delimiters, versions, and container structure often change implementation behavior.
Untrusted input is not safe just because the format was detected. Account for parser exceptions, large files, unexpected encodings, and external references.
11 samples help test leading-byte detection, parser errors, upload limits, and download behavior.
Blue Sky JS is a JavaScript sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
01-blue-sky.js7d3b2994ee0a1c9c28837d0ba8de3ec918b7820baa1291e49ef20c85c9a343ffFlower Garden JS is a JavaScript sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
02-flower-garden.jse4e0e31904121880833d098f0ece7e5f03c7a87c9e8bfc347620f2b0edd23755Navy Blue Sky JS is a JavaScript sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
03-navy-blue-sky.js68a18b0a81d6a381122fdca7a48615cccef3e9321b56eb3d848906446faef1a8Nature of the Sky JS is a JavaScript sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
04-nature-sky.js88f8a8495116ba8f94009b85973fe8d1682fbd9df9858f078a8a16bb8cf419c6Sky Landscape JS is a JavaScript sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
05-sky-landscape.js12c8c7523d5e78f0eef8f10c99b51f90230c44c290ae8f54d560f64222c70772Starry Sky JS is a JavaScript sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
06-starry-sky.jsd0a79f3af31aac614a4aa57699d5916597a604ad7f46e9e46d6d70f52ba5cc78Blue Night Sky JS is a JavaScript sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
07-blue-night-sky.jsd172ade12c1b20dc0894883054a56a48036c23d954ae2d33c29e75323ed99492Hibiscus Flower JS is a JavaScript sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
08-hibiscus-flower.jsadd6427d73d92168b6c82a494d5767ab535830a8800de179191eca218c1dcd47Arctic Sky JS is a JavaScript sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
09-arctic-sky.jsfaec434d8db0ad7ebc4aa173410aa473e07ff40afb5e9f79f1e7ed9e40b75c0aSunset Rays JS is a JavaScript sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
10-sunset-rays.jsff8d74f4347a005c4c07e4e0c1914439b5b893d81328fd483c378ad2efd7324aNASA Blue Marble JS is a JavaScript sample based on NASA Image and Video Library. It can be used to test downloads, parsers, previews, and file type detection.
nasa-blue-marble-2012-east.js83674dbcffe0c1c778f58bac76805f2f5b1f6399e064a9ec50feba9c7624cdf2JavaScript files begin with the byte signature 65 78 70 6F 72 74 ("export"). Detect the format by reading these leading bytes rather than trusting the file extension alone.
The MIME type for JavaScript is text/javascript, application/javascript.
JavaScript files use the .js, .mjs, .cjs extension. The extension is a convention only and does not guarantee the file contents, so combine it with signature and structure checks.