/** * Checks whether a value is a primitive. * * Helpful links: * * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures * * http://javascriptweblog.wordpress.com/2010/09/27/the-secret-life-of-javascript-primitives/ * * NOTE! A primitive value wrapped by a corresponding object is not a primitive anymore * * * @example * is.primitive('test'); // true * is.primitive(undefined); // true * is.primitive(10); // true * is.primitive(null); // true * is.primitive(false); // true * * is.primitive(new Number(10)); // false * is.primitive(new String('test')); // false * is.primitive(new Boolean(true)); // false * is.primitive({}); // false */ declare function isPrimitive(value: any): value is (string | number | boolean | null | undefined); export default isPrimitive;