Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

scourjs

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scourjs - npm Package Compare versions

Comparing version
0.9.2
to
0.9.3
+2
-2
HISTORY.md
# Changelog
## [v0.9.2]
## [v0.9.3]
> Dec 30, 2015

@@ -92,2 +92,2 @@

[v0.9.1]: https://github.com/rstacruz/scour/compare/v0.9.0...v0.9.1
[v0.9.2]: https://github.com/rstacruz/scour/compare/v0.9.1...v0.9.2
[v0.9.3]: https://github.com/rstacruz/scour/compare/v0.9.1...v0.9.3
{
"name": "scourjs",
"description": "Traverse objects and arrays",
"version": "0.9.2",
"version": "0.9.3",
"author": "Rico Sta. Cruz <rico@ricostacruz.com>",

@@ -16,3 +16,3 @@ "babel": {

"object-assign": "4.0.1",
"scour-search": "0.3.2",
"scour-search": "0.3.3",
"to-function": "2.0.6"

@@ -19,0 +19,0 @@ },

@@ -18,4 +18,4 @@ /**

if (isArguments) keypath = Array.prototype.slice.call(keypath)
return keypath.map((k) => '' + k)
return keypath.map(function (k) { return '' + k })
}
}

@@ -12,7 +12,7 @@ var map = require('./map')

var values = map(each, (value, key, index) => ({
key, value, criteria: condition(value, key), index
}))
var values = map(each, function (value, key, index) {
return { key: key, value: value, criteria: condition(value, key), index: index }
})
return sortValues(values, isArray)
}

@@ -11,3 +11,3 @@ var indexedMap = require('../utilities/indexed_map')

module.exports = function sortValues (values, isArray) {
var sorted = values.sort((left, right) => {
var sorted = values.sort(function (left, right) {
var a = left.criteria

@@ -23,6 +23,6 @@ var b = right.criteria

if (isArray === false) {
return indexedMap(sorted, (res) => [ res.key, res.value ])
return indexedMap(sorted, function (res) { return [ res.key, res.value ] })
} else {
return map(sorted, (res) => res.value)
return map(sorted, function (res) { return res.value })
}
}