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

racer

Package Overview
Dependencies
Maintainers
7
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

racer - npm Package Compare versions

Comparing version 2.0.0-beta.14 to 2.0.0-beta.15

8

lib/Model/filter.d.ts

@@ -30,6 +30,6 @@ import { Model } from './Model';

*/
filter<S>(inputPath: PathLike, additionalInputPaths: PathLike[], options: PaginationOptions, fn: FilterFn<S>): Filter<S>;
filter<S>(inputPath: PathLike, additionalInputPaths: PathLike[], fn: FilterFn<S>): Filter<S>;
filter<S>(inputPath: PathLike, options: PaginationOptions, fn: FilterFn<S>): Filter<S>;
filter<S>(inputPath: PathLike, fn: FilterFn<S>): Filter<S>;
filter<S>(inputPath: PathLike, additionalInputPaths: PathLike[], options: PaginationOptions, fn?: FilterFn<S>): Filter<S>;
filter<S>(inputPath: PathLike, additionalInputPaths: PathLike[], fn?: FilterFn<S>): Filter<S>;
filter<S>(inputPath: PathLike, options: PaginationOptions, fn?: FilterFn<S>): Filter<S>;
filter<S>(inputPath: PathLike, fn?: FilterFn<S>): Filter<S>;
removeAllFilters: (subpath: Path) => void;

@@ -36,0 +36,0 @@ /**

@@ -24,6 +24,24 @@ Object.defineProperty(exports, "__esModule", { value: true });

function parseFilterArguments(model, args) {
var fn = args.pop();
var options, inputPaths;
var fn, options, inputPaths;
// first arg always path
var path = model.path(args.shift());
if (!args.length) {
return {
path: path,
inputPaths: null,
options: options,
fn: function () { return true; },
};
}
var last = args[args.length - 1];
if (typeof last === 'function') {
// fn null if optional
// filter can be string
fn = args.pop();
}
if (args.length && fn == null) {
// named function
fn = args.pop();
}
last = args[args.length - 1];
if (!model.isPath(last) && !Array.isArray(last)) {

@@ -30,0 +48,0 @@ options = args.pop();

@@ -232,9 +232,16 @@ Object.defineProperty(exports, "__esModule", { value: true });

if (typeof arguments[1] === 'function') {
// (value, callback)
value = arguments[0];
cb = arguments[1];
}
else {
else if (typeof arguments[0] === 'string' && typeof arguments[1] === 'object') {
// (path, value)
subpath = arguments[0];
value = arguments[1];
}
else {
// (value, null)
value = arguments[0];
cb = arguments[1];
}
}

@@ -241,0 +248,0 @@ else {

@@ -12,3 +12,3 @@ {

},
"version": "2.0.0-beta.14",
"version": "2.0.0-beta.15",
"main": "./lib/index.js",

@@ -15,0 +15,0 @@ "files": [

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