sfcode
An Online Competing and Development Environment
Value

Value, any value that's neither null nor undefined .

<tt>value/is</tt>

Confirms whether passed argument is a value

const isValue = require("type/value/is");
isValue({}); // true
isValue(null); // false

<tt>value/ensure</tt>

Ensures if given argument is a value. If it's a value it is returned back, if not TypeError is thrown

const ensureValue = require("type/value/ensure");
const obj = {};
ensureValue(obj); // obj
ensureValue(null); // Thrown TypeError: Cannot use null