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

@aryth/rank-vector

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aryth/rank-vector - npm Package Compare versions

Comparing version 0.1.11 to 0.1.12

18

dist/index.cjs.js

@@ -6,2 +6,3 @@ 'use strict';

var comparer = require('@aryth/comparer');
var literal = require('@typen/literal');
var numLoose = require('@typen/num-loose');

@@ -37,18 +38,16 @@ var vectorMapper = require('@vect/vector-mapper');

const isAlphabetic = x => /[A-Za-z0-9]+/.test(x);
/**
*
* @param words
* @param {Object} x
* @param {Object} y
* @param {Object|Function} x
* @param {Object|Function} y
* @return {number[]}
*/
const duoRank = (words, x = {
const duorank = (words, x = {
filter: numLoose.isNumeric,
comparer: comparer.NUM_DESC
comparer: comparer.NUM_ASC
}, y = {
filter: isAlphabetic,
comparer: comparer.STR_DESC
filter: literal.isLiteral,
comparer: comparer.STR_ASC
}) => {

@@ -78,4 +77,5 @@ const primVec = [],

exports.duoRank = duoRank;
exports.duoRank = duorank;
exports.duorank = duorank;
exports.rank = rank;
exports.reorderBy = reorderBy;

@@ -1,2 +0,3 @@

import { NUM_DESC, STR_DESC } from '@aryth/comparer';
import { NUM_ASC, STR_ASC } from '@aryth/comparer';
import { isLiteral } from '@typen/literal';
import { isNumeric } from '@typen/num-loose';

@@ -32,18 +33,16 @@ import { iterate, mapper } from '@vect/vector-mapper';

const isAlphabetic = x => /[A-Za-z0-9]+/.test(x);
/**
*
* @param words
* @param {Object} x
* @param {Object} y
* @param {Object|Function} x
* @param {Object|Function} y
* @return {number[]}
*/
const duoRank = (words, x = {
const duorank = (words, x = {
filter: isNumeric,
comparer: NUM_DESC
comparer: NUM_ASC
}, y = {
filter: isAlphabetic,
comparer: STR_DESC
filter: isLiteral,
comparer: STR_ASC
}) => {

@@ -73,2 +72,2 @@ const primVec = [],

export { duoRank, rank, reorderBy };
export { duorank as duoRank, duorank, rank, reorderBy };
{
"name": "@aryth/rank-vector",
"version": "0.1.11",
"version": "0.1.12",
"description": "A math util library",

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

"dependencies": {
"@aryth/comparer": "^0.1.11",
"@typen/num-loose": "^0.1.1",
"@aryth/comparer": "^0.1.12",
"@typen/literal": "^0.1.3",
"@typen/num-loose": "^0.1.3",
"@vect/vector-algebra": "^0.2.4",

@@ -44,3 +45,3 @@ "@vect/vector-mapper": "^0.2.4"

"homepage": "https://github.com/hoyeungw/aryth#readme",
"gitHead": "f3220c3d67385988497e75fac5c69b3505990dcd"
"gitHead": "a9239fa923105830437c22a1eea3d9af727a4a40"
}
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