Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@typen/vector-type

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typen/vector-type - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

14

dist/index.cjs.js

@@ -10,2 +10,4 @@ 'use strict';

const nullish = x => x === null || x === void 0;
/**

@@ -24,9 +26,9 @@ *

let o,
nullish = null;
nullType = null;
const distinct = (l = vec === null || vec === void 0 ? void 0 : vec.length) === (l & 0x7f) ? (o = [], vectorMapper.iterate(vec, x => {
if (omitNull && nullish(x)) nullish = x;else if (o.indexOf(x = inferType$1(x)) < 0) o.push(x);
if (omitNull && nullish(x)) nullType = x;else if (o.indexOf(x = inferType$1(x)) < 0) o.push(x);
}, l), o) : (o = {}, vectorMapper.iterate(vec, x => {
if (omitNull && nullish(x)) nullish = x;else if (!((x = inferType$1(x)) in o)) o[x] = void 0;
if (omitNull && nullish(x)) nullType = x;else if (!((x = inferType$1(x)) in o)) o[x] = void 0;
}, l), Object.keys(o));
return distinct.length ? distinct : [nullish];
return distinct.length ? distinct : [nullType];
};

@@ -67,5 +69,3 @@ /**

const VectorType = (config = {}) => {
return vectorType.bind(config);
};
const VectorType = (config = {}) => vectorType.bind(config);

@@ -72,0 +72,0 @@ exports.InferTypes = InferTypes;

@@ -6,2 +6,4 @@ import { NUL, NUM } from '@typen/enum-data-types';

const nullish = x => x === null || x === void 0;
/**

@@ -20,9 +22,9 @@ *

let o,
nullish = null;
nullType = null;
const distinct = (l = vec === null || vec === void 0 ? void 0 : vec.length) === (l & 0x7f) ? (o = [], iterate(vec, x => {
if (omitNull && nullish(x)) nullish = x;else if (o.indexOf(x = inferType(x)) < 0) o.push(x);
if (omitNull && nullish(x)) nullType = x;else if (o.indexOf(x = inferType(x)) < 0) o.push(x);
}, l), o) : (o = {}, iterate(vec, x => {
if (omitNull && nullish(x)) nullish = x;else if (!((x = inferType(x)) in o)) o[x] = void 0;
if (omitNull && nullish(x)) nullType = x;else if (!((x = inferType(x)) in o)) o[x] = void 0;
}, l), Object.keys(o));
return distinct.length ? distinct : [nullish];
return distinct.length ? distinct : [nullType];
};

@@ -63,6 +65,4 @@ /**

const VectorType = (config = {}) => {
return vectorType.bind(config);
};
const VectorType = (config = {}) => vectorType.bind(config);
export { InferTypes, VectorType, inferTypes, vectorType };
{
"name": "@typen/vector-type",
"version": "0.1.8",
"version": "0.1.9",
"description": "Check type for array",

@@ -18,6 +18,6 @@ "main": "dist/index.cjs.js",

"dependencies": {
"@typen/enum-data-types": "^0.1.8",
"@typen/enum-tabular-types": "^0.1.8",
"@typen/infer-type": "^0.1.8",
"@typen/num-strict": "^0.1.8",
"@typen/enum-data-types": "^0.1.9",
"@typen/enum-tabular-types": "^0.1.9",
"@typen/infer-type": "^0.1.9",
"@typen/num-strict": "^0.1.9",
"@vect/vector-mapper": "^0.2.9"

@@ -40,3 +40,3 @@ },

"homepage": "https://github.com/hoyeungw/typen#readme",
"gitHead": "4d0944b622508c4ba7b58434cf9561fd477df810"
"gitHead": "2d6090b8ca96a339fa7e18bb34bf74bb479485f1"
}
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