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

xjst

Package Overview
Dependencies
Maintainers
3
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xjst - npm Package Compare versions

Comparing version 0.5.20 to 0.5.21

15

lib/xjst/engines/sort-group.js

@@ -126,11 +126,18 @@ var xjst = require('../../xjst'),

return templates.map(function(template) {
var filter = options.scoreFilter;
return [
template[0].slice().sort(function(a, b) {
var rateA = chart[a[0]].count /
Math.log(Math.E * (1 + chart[a[0]].variance)),
rateB = chart[b[0]].count /
Math.log(Math.E * (1 + chart[b[0]].variance)),
var ca = chart[a[0]];
var cb = chart[b[0]];
var rateA = ca.count / Math.log(Math.E * (1 + ca.variance)),
rateB = cb.count / Math.log(Math.E * (1 + cb.variance)),
strA = utils.stringify(a[1]),
strB = utils.stringify(b[1]);
if (options.scoreFilter) {
rateA += options.scoreFilter(a[1], strA, rateA);
rateB += options.scoreFilter(b[1], strB, rateB);
}
return rateA > rateB ?

@@ -137,0 +144,0 @@ -1

{
"name": "xjst",
"description": "XSLT inspired JavaScript templates (with spices)",
"version": "0.5.20",
"version": "0.5.21",
"homepage": "http://github.com/veged/xjst",

@@ -6,0 +6,0 @@ "author": "Sergey Berezhnoy <veged@mail.ru> (http://github.com/veged)",

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