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

@vect/object-select

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vect/object-select - npm Package Compare versions

Comparing version 0.1.12 to 0.1.13

23

dist/index.cjs.js

@@ -5,4 +5,26 @@ 'use strict';

var rand = require('@aryth/rand');
var comparer = require('@aryth/comparer');
var vectorMapper = require('@vect/vector-mapper');
const leap = (o, start, gap) => {
var _ref;
const keys = (_ref = undefined === null || undefined === void 0 ? void 0 : undefined.keys) !== null && _ref !== void 0 ? _ref : Object.keys(o);
const wd = keys.length,
df = comparer.max(gap, wd),
rs = {};
let lo = start ? comparer.min(start, wd - 1) : rand.rand(wd),
hi = lo + df,
i = lo,
k;
while (lo++ < hi) {
rs[k = keys[i++]] = o[k];
if (i === wd) i = 0;
}
return rs;
};
/**

@@ -62,4 +84,5 @@ *

exports.leap = leap;
exports.lookupKeys = lookupKeys;
exports.select = select;
exports.selectValues = selectValues;

24

dist/index.esm.js

@@ -0,3 +1,25 @@

import { rand } from '@aryth/rand';
import { max, min } from '@aryth/comparer';
import { iterate } from '@vect/vector-mapper';
const leap = (o, start, gap) => {
var _ref;
const keys = (_ref = undefined === null || undefined === void 0 ? void 0 : undefined.keys) !== null && _ref !== void 0 ? _ref : Object.keys(o);
const wd = keys.length,
df = max(gap, wd),
rs = {};
let lo = start ? min(start, wd - 1) : rand(wd),
hi = lo + df,
i = lo,
k;
while (lo++ < hi) {
rs[k = keys[i++]] = o[k];
if (i === wd) i = 0;
}
return rs;
};
/**

@@ -57,2 +79,2 @@ *

export { lookupKeys, select, selectValues };
export { leap, lookupKeys, select, selectValues };

7

package.json
{
"name": "@vect/object-select",
"version": "0.1.12",
"version": "0.1.13",
"description": "Select from object/array",

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

"dependencies": {
"@aryth/comparer": "^0.0.13",
"@aryth/rand": "^0.0.13",
"@vect/swap": "^0.1.12",
"@vect/vector-mapper": "^0.1.12"

@@ -36,3 +39,3 @@ },

"homepage": "https://github.com/hoyeungw/vect#readme",
"gitHead": "e91bc62c84e8e587d8e10d3b4a0fdba87ad69aeb"
"gitHead": "ae04b29d32f5867613804444771b84bd3308d06a"
}
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