@aryth/rank-vector
Advanced tools
Comparing version 0.1.11 to 0.1.12
@@ -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" | ||
} |
7415
125
5
+ Added@typen/literal@^0.1.3
+ Added@spare/regex-charset@0.13.16(transitive)
+ Added@typen/literal@0.1.19(transitive)
Updated@aryth/comparer@^0.1.12
Updated@typen/num-loose@^0.1.3