BLUE
PHP 7.4.33
Path:
/var/www/sitesecurity.bitkit.dk/httpdocs/node_modules/sharp/lib
Run
Logout
Edit File
Size: 3.14 KB
Close
/var/www/sitesecurity.bitkit.dk/httpdocs/node_modules/sharp/lib/is.js
Text
Base64
// Copyright 2013 Lovell Fuller and others. // SPDX-License-Identifier: Apache-2.0 'use strict'; /** * Is this value defined and not null? * @private */ const defined = function (val) { return typeof val !== 'undefined' && val !== null; }; /** * Is this value an object? * @private */ const object = function (val) { return typeof val === 'object'; }; /** * Is this value a plain object? * @private */ const plainObject = function (val) { return Object.prototype.toString.call(val) === '[object Object]'; }; /** * Is this value a function? * @private */ const fn = function (val) { return typeof val === 'function'; }; /** * Is this value a boolean? * @private */ const bool = function (val) { return typeof val === 'boolean'; }; /** * Is this value a Buffer object? * @private */ const buffer = function (val) { return val instanceof Buffer; }; /** * Is this value a typed array object?. E.g. Uint8Array or Uint8ClampedArray? * @private */ const typedArray = function (val) { if (defined(val)) { switch (val.constructor) { case Uint8Array: case Uint8ClampedArray: case Int8Array: case Uint16Array: case Int16Array: case Uint32Array: case Int32Array: case Float32Array: case Float64Array: return true; } } return false; }; /** * Is this value an ArrayBuffer object? * @private */ const arrayBuffer = function (val) { return val instanceof ArrayBuffer; }; /** * Is this value a non-empty string? * @private */ const string = function (val) { return typeof val === 'string' && val.length > 0; }; /** * Is this value a real number? * @private */ const number = function (val) { return typeof val === 'number' && !Number.isNaN(val); }; /** * Is this value an integer? * @private */ const integer = function (val) { return Number.isInteger(val); }; /** * Is this value within an inclusive given range? * @private */ const inRange = function (val, min, max) { return val >= min && val <= max; }; /** * Is this value within the elements of an array? * @private */ const inArray = function (val, list) { return list.includes(val); }; /** * Create an Error with a message relating to an invalid parameter. * * @param {string} name - parameter name. * @param {string} expected - description of the type/value/range expected. * @param {*} actual - the value received. * @returns {Error} Containing the formatted message. * @private */ const invalidParameterError = function (name, expected, actual) { return new Error( `Expected ${expected} for ${name} but received ${actual} of type ${typeof actual}` ); }; /** * Ensures an Error from C++ contains a JS stack. * * @param {Error} native - Error with message from C++. * @param {Error} context - Error with stack from JS. * @returns {Error} Error with message and stack. * @private */ const nativeError = function (native, context) { context.message = native.message; return context; }; module.exports = { defined, object, plainObject, fn, bool, buffer, typedArray, arrayBuffer, string, number, integer, inRange, inArray, invalidParameterError, nativeError };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 14
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
channel.js
5.17 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
colour.js
4.99 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
composite.js
8.65 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
constructor.js
16.12 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.d.ts
80.73 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
395 B
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
input.js
25.25 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
is.js
3.14 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
libvips.js
5.77 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
operation.js
31.28 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
output.js
57.26 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
resize.js
20.35 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
sharp.js
3.75 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utility.js
9.50 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).