New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@thi.ng/checks

Package Overview
Dependencies
Maintainers
1
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thi.ng/checks - npm Package Compare versions

Comparing version 2.7.13 to 2.8.0

is-numeric.d.ts

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [2.8.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.7.13...@thi.ng/checks@2.8.0) (2021-01-10)
### Features
* **checks:** add isNumericInt/Float() checks ([7e054c1](https://github.com/thi-ng/umbrella/commit/7e054c14b06850800869ba0bc8c8174e233dda53))
## [2.7.13](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@2.7.12...@thi.ng/checks@2.7.13) (2021-01-02)

@@ -8,0 +19,0 @@

1

index.d.ts

@@ -44,2 +44,3 @@ export * from "./exists-not-null";

export * from "./is-number";
export * from "./is-numeric";
export * from "./is-object";

@@ -46,0 +47,0 @@ export * from "./is-odd";

@@ -44,2 +44,3 @@ export * from "./exists-not-null";

export * from "./is-number";
export * from "./is-numeric";
export * from "./is-object";

@@ -46,0 +47,0 @@ export * from "./is-odd";

@@ -117,2 +117,5 @@ 'use strict';

const isNumericInt = (x) => /^[-+]?\d+$/.test(x);
const isNumericFloat = (x) => /^[-+]?\d*\.?\d+(e[-+]?\d+)?$/i.test(x);
const isObject = (x) => x !== null && typeof x === "object";

@@ -227,2 +230,4 @@

exports.isNumeric = isNumeric;
exports.isNumericFloat = isNumericFloat;
exports.isNumericInt = isNumericInt;
exports.isObject = isObject;

@@ -229,0 +234,0 @@ exports.isOdd = isOdd;

2

lib/index.umd.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).thi=e.thi||{},e.thi.ng=e.thi.ng||{},e.thi.ng.checks={}))}(this,(function(e){"use strict";const t=e=>"function"==typeof e,n=(e,t)=>null!=e&&"function"==typeof e[t],i=Array.isArray,o=()=>"undefined"!=typeof window&&!!window.chrome,s=/^(?:[-+]?(?:[0-9]+))?(?:\.[0-9]*)?(?:[eE][\+\-]?(?:[0-9]+))?$/,a=e=>"string"==typeof e,r=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,f=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,l=Object.getPrototypeOf,d=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,c=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;e.exists=e=>void 0!==e,e.existsAndNotNull=e=>null!=e,e.hasBigInt=()=>"function"==typeof BigInt,e.hasCrypto=()=>"undefined"!=typeof window&&void 0!==window.crypto,e.hasMaxLength=(e,t)=>null!=t&&t.length<=e,e.hasMinLength=(e,t)=>null!=t&&t.length>=e,e.hasPerformance=()=>"undefined"!=typeof performance&&t(performance.now),e.hasWASM=()=>"undefined"!=typeof window&&void 0!==window.WebAssembly||"undefined"!=typeof global&&void 0!==global.WebAssembly,e.hasWebGL=()=>{try{return document.createElement("canvas").getContext("webgl"),!0}catch(e){return!1}},e.hasWebSocket=()=>"undefined"!=typeof WebSocket,e.implementsFunction=n,e.isASCII=e=>/^[\x00-\x7f]+$/.test(e),e.isAlpha=e=>/^[a-z]+$/i.test(e),e.isAlphaNum=e=>/^[a-z0-9]+$/i.test(e),e.isArray=i,e.isArrayLike=e=>null!=e&&"function"!=typeof e&&void 0!==e.length,e.isAsyncIterable=e=>null!=e&&"function"==typeof e[Symbol.asyncIterator],e.isBlob=e=>e instanceof Blob,e.isBoolean=e=>"boolean"==typeof e,e.isChrome=o,e.isDataURL=e=>/^data:.+\/(.+);base64,/.test(e),e.isDate=e=>e instanceof Date,e.isEven=e=>e%2==0,e.isFalse=e=>!1===e,e.isFile=e=>e instanceof File,e.isFirefox=()=>"undefined"!=typeof window&&!!window.InstallTrigger,e.isFloatString=e=>e.length>0&&s.test(e),e.isFunction=t,e.isHex=e=>/^[a-f0-9]+$/i.test(e),e.isHexColor=e=>a(e)&&r.test(e),e.isIE=()=>"undefined"!=typeof document&&(void 0!==document.documentMode||navigator.userAgent.indexOf("MSIE")>0),e.isInRange=(e,t,n)=>n>=e&&n<=t,e.isInt32=e=>"number"==typeof e&&(0|e)===e,e.isIntString=e=>f.test(e),e.isIterable=e=>null!=e&&"function"==typeof e[Symbol.iterator],e.isMap=e=>e instanceof Map,e.isMobile=()=>"undefined"!=typeof navigator&&/mobile|tablet|ip(ad|hone|od)|android|silk|crios/i.test(navigator.userAgent),e.isNaN=e=>e!=e,e.isNegative=e=>"number"==typeof e&&e<0,e.isNil=e=>null==e,e.isNode=()=>"object"==typeof process&&"object"==typeof process.versions&&void 0!==process.versions.node,e.isNotStringAndIterable=e=>null!=e&&"string"!=typeof e&&"function"==typeof e[Symbol.iterator],e.isNull=e=>null===e,e.isNumber=e=>"number"==typeof e,e.isNumeric=e=>/^[0-9]+$/.test(e),e.isObject=e=>null!==e&&"object"==typeof e,e.isOdd=e=>e%2!=0,e.isPlainObject=e=>{let t;return null!=e&&"object"==typeof e&&(null===(t=l(e))||null===l(t))},e.isPositive=e=>"number"==typeof e&&e>0,e.isPrimitive=e=>{const t=typeof e;return"string"===t||"number"===t},e.isPrintableASCII=e=>/^[\x20-\x7e]+$/.test(e),e.isPromise=e=>e instanceof Promise,e.isPromiseLike=e=>e instanceof Promise||n(e,"then")&&n(e,"catch"),e.isRegExp=e=>e instanceof RegExp,e.isSafari=()=>"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!o(),e.isSet=e=>e instanceof Set,e.isString=a,e.isSymbol=e=>"symbol"==typeof e,e.isTransferable=e=>e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer||"undefined"!=typeof MessagePort&&e instanceof MessagePort,e.isTrue=e=>!0===e,e.isTypedArray=e=>e&&(e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint32Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Int8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Uint8ClampedArray),e.isUUID=e=>d.test(e),e.isUUIDv4=e=>c.test(e),e.isUint32=e=>"number"==typeof e&&e>>>0===e,e.isUndefined=e=>void 0===e,e.isZero=e=>0===e,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).thi=e.thi||{},e.thi.ng=e.thi.ng||{},e.thi.ng.checks={}))}(this,(function(e){"use strict";const t=e=>"function"==typeof e,n=(e,t)=>null!=e&&"function"==typeof e[t],i=Array.isArray,o=()=>"undefined"!=typeof window&&!!window.chrome,s=/^(?:[-+]?(?:[0-9]+))?(?:\.[0-9]*)?(?:[eE][\+\-]?(?:[0-9]+))?$/,a=e=>"string"==typeof e,r=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,f=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,l=Object.getPrototypeOf,d=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,c=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;e.exists=e=>void 0!==e,e.existsAndNotNull=e=>null!=e,e.hasBigInt=()=>"function"==typeof BigInt,e.hasCrypto=()=>"undefined"!=typeof window&&void 0!==window.crypto,e.hasMaxLength=(e,t)=>null!=t&&t.length<=e,e.hasMinLength=(e,t)=>null!=t&&t.length>=e,e.hasPerformance=()=>"undefined"!=typeof performance&&t(performance.now),e.hasWASM=()=>"undefined"!=typeof window&&void 0!==window.WebAssembly||"undefined"!=typeof global&&void 0!==global.WebAssembly,e.hasWebGL=()=>{try{return document.createElement("canvas").getContext("webgl"),!0}catch(e){return!1}},e.hasWebSocket=()=>"undefined"!=typeof WebSocket,e.implementsFunction=n,e.isASCII=e=>/^[\x00-\x7f]+$/.test(e),e.isAlpha=e=>/^[a-z]+$/i.test(e),e.isAlphaNum=e=>/^[a-z0-9]+$/i.test(e),e.isArray=i,e.isArrayLike=e=>null!=e&&"function"!=typeof e&&void 0!==e.length,e.isAsyncIterable=e=>null!=e&&"function"==typeof e[Symbol.asyncIterator],e.isBlob=e=>e instanceof Blob,e.isBoolean=e=>"boolean"==typeof e,e.isChrome=o,e.isDataURL=e=>/^data:.+\/(.+);base64,/.test(e),e.isDate=e=>e instanceof Date,e.isEven=e=>e%2==0,e.isFalse=e=>!1===e,e.isFile=e=>e instanceof File,e.isFirefox=()=>"undefined"!=typeof window&&!!window.InstallTrigger,e.isFloatString=e=>e.length>0&&s.test(e),e.isFunction=t,e.isHex=e=>/^[a-f0-9]+$/i.test(e),e.isHexColor=e=>a(e)&&r.test(e),e.isIE=()=>"undefined"!=typeof document&&(void 0!==document.documentMode||navigator.userAgent.indexOf("MSIE")>0),e.isInRange=(e,t,n)=>n>=e&&n<=t,e.isInt32=e=>"number"==typeof e&&(0|e)===e,e.isIntString=e=>f.test(e),e.isIterable=e=>null!=e&&"function"==typeof e[Symbol.iterator],e.isMap=e=>e instanceof Map,e.isMobile=()=>"undefined"!=typeof navigator&&/mobile|tablet|ip(ad|hone|od)|android|silk|crios/i.test(navigator.userAgent),e.isNaN=e=>e!=e,e.isNegative=e=>"number"==typeof e&&e<0,e.isNil=e=>null==e,e.isNode=()=>"object"==typeof process&&"object"==typeof process.versions&&void 0!==process.versions.node,e.isNotStringAndIterable=e=>null!=e&&"string"!=typeof e&&"function"==typeof e[Symbol.iterator],e.isNull=e=>null===e,e.isNumber=e=>"number"==typeof e,e.isNumeric=e=>/^[0-9]+$/.test(e),e.isNumericFloat=e=>/^[-+]?\d*\.?\d+(e[-+]?\d+)?$/i.test(e),e.isNumericInt=e=>/^[-+]?\d+$/.test(e),e.isObject=e=>null!==e&&"object"==typeof e,e.isOdd=e=>e%2!=0,e.isPlainObject=e=>{let t;return null!=e&&"object"==typeof e&&(null===(t=l(e))||null===l(t))},e.isPositive=e=>"number"==typeof e&&e>0,e.isPrimitive=e=>{const t=typeof e;return"string"===t||"number"===t},e.isPrintableASCII=e=>/^[\x20-\x7e]+$/.test(e),e.isPromise=e=>e instanceof Promise,e.isPromiseLike=e=>e instanceof Promise||n(e,"then")&&n(e,"catch"),e.isRegExp=e=>e instanceof RegExp,e.isSafari=()=>"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!o(),e.isSet=e=>e instanceof Set,e.isString=a,e.isSymbol=e=>"symbol"==typeof e,e.isTransferable=e=>e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer||"undefined"!=typeof MessagePort&&e instanceof MessagePort,e.isTrue=e=>!0===e,e.isTypedArray=e=>e&&(e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint32Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Int8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Uint8ClampedArray),e.isUUID=e=>d.test(e),e.isUUIDv4=e=>c.test(e),e.isUint32=e=>"number"==typeof e&&e>>>0===e,e.isUndefined=e=>void 0===e,e.isZero=e=>0===e,Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "@thi.ng/checks",
"version": "2.7.13",
"version": "2.8.0",
"description": "Collection of 50+ type, feature & value checks",

@@ -74,3 +74,3 @@ "module": "./index.js",

"sideEffects": false,
"gitHead": "a2127bae6d16682027fd94190452b8404bf99a47"
"gitHead": "ec0b1d686c9d5f8f73e2c170b9915c2dd875903f"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc