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

chimpanzee

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chimpanzee - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

67

dist/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.match = exports.builtins = exports.Result = exports.Skip = exports.Match = exports.Fault = exports.Empty = exports.permuteObject = exports.permuteArray = exports.permute = exports.wrap = exports.unordered = exports.repeating = exports.recursive = exports.optionalItem = exports.regex = exports.optional = exports.string = exports.object = exports.number = exports.func = exports.bool = exports.map = exports.exists = exports.empty = exports.deep = exports.composite = exports.take = exports.modify = exports.literal = exports.captureAndParse = exports.captureIf = exports.capture = exports.any = exports.parse = void 0;
const parse_1 = require("./parse");
var parse_2 = require("./parse");
exports.parse = parse_2.default;
Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return parse_2.default; } });
var any_1 = require("./operators/any");
exports.any = any_1.any;
Object.defineProperty(exports, "any", { enumerable: true, get: function () { return any_1.any; } });
var capture_1 = require("./operators/capture");
exports.capture = capture_1.capture;
exports.captureIf = capture_1.captureIf;
exports.captureAndParse = capture_1.captureAndParse;
exports.literal = capture_1.literal;
exports.modify = capture_1.modify;
exports.take = capture_1.take;
Object.defineProperty(exports, "capture", { enumerable: true, get: function () { return capture_1.capture; } });
Object.defineProperty(exports, "captureIf", { enumerable: true, get: function () { return capture_1.captureIf; } });
Object.defineProperty(exports, "captureAndParse", { enumerable: true, get: function () { return capture_1.captureAndParse; } });
Object.defineProperty(exports, "literal", { enumerable: true, get: function () { return capture_1.literal; } });
Object.defineProperty(exports, "modify", { enumerable: true, get: function () { return capture_1.modify; } });
Object.defineProperty(exports, "take", { enumerable: true, get: function () { return capture_1.take; } });
var composite_1 = require("./operators/composite");
exports.composite = composite_1.composite;
Object.defineProperty(exports, "composite", { enumerable: true, get: function () { return composite_1.composite; } });
var deep_1 = require("./operators/deep");
exports.deep = deep_1.deep;
Object.defineProperty(exports, "deep", { enumerable: true, get: function () { return deep_1.deep; } });
var empty_1 = require("./operators/empty");
exports.empty = empty_1.empty;
Object.defineProperty(exports, "empty", { enumerable: true, get: function () { return empty_1.empty; } });
var exists_1 = require("./operators/exists");
exports.exists = exists_1.exists;
Object.defineProperty(exports, "exists", { enumerable: true, get: function () { return exists_1.exists; } });
var map_1 = require("./operators/map");
exports.map = map_1.map;
Object.defineProperty(exports, "map", { enumerable: true, get: function () { return map_1.map; } });
var types_1 = require("./operators/types");
exports.bool = types_1.bool;
exports.func = types_1.func;
exports.number = types_1.number;
exports.object = types_1.object;
exports.string = types_1.string;
Object.defineProperty(exports, "bool", { enumerable: true, get: function () { return types_1.bool; } });
Object.defineProperty(exports, "func", { enumerable: true, get: function () { return types_1.func; } });
Object.defineProperty(exports, "number", { enumerable: true, get: function () { return types_1.number; } });
Object.defineProperty(exports, "object", { enumerable: true, get: function () { return types_1.object; } });
Object.defineProperty(exports, "string", { enumerable: true, get: function () { return types_1.string; } });
var optional_1 = require("./operators/optional");
exports.optional = optional_1.optional;
Object.defineProperty(exports, "optional", { enumerable: true, get: function () { return optional_1.optional; } });
var regex_1 = require("./operators/regex");
exports.regex = regex_1.regex;
Object.defineProperty(exports, "regex", { enumerable: true, get: function () { return regex_1.regex; } });
var array_1 = require("./operators/array");
exports.optionalItem = array_1.optionalItem;
exports.recursive = array_1.recursive;
exports.repeating = array_1.repeating;
exports.unordered = array_1.unordered;
Object.defineProperty(exports, "optionalItem", { enumerable: true, get: function () { return array_1.optionalItem; } });
Object.defineProperty(exports, "recursive", { enumerable: true, get: function () { return array_1.recursive; } });
Object.defineProperty(exports, "repeating", { enumerable: true, get: function () { return array_1.repeating; } });
Object.defineProperty(exports, "unordered", { enumerable: true, get: function () { return array_1.unordered; } });
var wrap_1 = require("./operators/wrap");
exports.wrap = wrap_1.wrap;
Object.defineProperty(exports, "wrap", { enumerable: true, get: function () { return wrap_1.wrap; } });
var permute_1 = require("./operators/permute");
exports.permute = permute_1.permute;
exports.permuteArray = permute_1.permuteArray;
exports.permuteObject = permute_1.permuteObject;
Object.defineProperty(exports, "permute", { enumerable: true, get: function () { return permute_1.permute; } });
Object.defineProperty(exports, "permuteArray", { enumerable: true, get: function () { return permute_1.permuteArray; } });
Object.defineProperty(exports, "permuteObject", { enumerable: true, get: function () { return permute_1.permuteObject; } });
var results_1 = require("./results");
exports.Empty = results_1.Empty;
exports.Fault = results_1.Fault;
exports.Match = results_1.Match;
exports.Skip = results_1.Skip;
exports.Result = results_1.Result;
Object.defineProperty(exports, "Empty", { enumerable: true, get: function () { return results_1.Empty; } });
Object.defineProperty(exports, "Fault", { enumerable: true, get: function () { return results_1.Fault; } });
Object.defineProperty(exports, "Match", { enumerable: true, get: function () { return results_1.Match; } });
Object.defineProperty(exports, "Skip", { enumerable: true, get: function () { return results_1.Skip; } });
Object.defineProperty(exports, "Result", { enumerable: true, get: function () { return results_1.Result; } });
const builtins = require("./operators/builtins");

@@ -53,0 +54,0 @@ exports.builtins = builtins;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.any = void 0;
const results_1 = require("../results");

@@ -4,0 +5,0 @@ const schemas_1 = require("../schemas");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.optionalItem = exports.recursive = exports.unordered = exports.repeating = void 0;
const results_1 = require("../results");

@@ -4,0 +5,0 @@ const schemas_1 = require("../schemas");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.val = exports.obj = exports.func = exports.arr = void 0;
const utils_1 = require("./utils");

@@ -4,0 +5,0 @@ const schemas_1 = require("../schemas");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.takeWithSchema = exports.take = exports.literal = exports.captureAndParse = exports.modify = exports.captureIf = exports.capture = void 0;
const results_1 = require("../results");

@@ -4,0 +5,0 @@ const parse_1 = require("../parse");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.composite = void 0;
const results_1 = require("../results");

@@ -4,0 +5,0 @@ const parse_1 = require("../parse");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.deep = void 0;
const results_1 = require("../results");

@@ -4,0 +5,0 @@ const parse_1 = require("../parse");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.empty = void 0;
const results_1 = require("../results");

@@ -4,0 +5,0 @@ const utils_1 = require("./utils");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.exists = void 0;
const results_1 = require("../results");

@@ -4,0 +5,0 @@ const parse_1 = require("../parse");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.map = void 0;
const results_1 = require("../results");

@@ -4,0 +5,0 @@ const parse_1 = require("../parse");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.optional = void 0;
const results_1 = require("../results");

@@ -4,0 +5,0 @@ const parse_1 = require("../parse");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.permuteArray = exports.permuteObject = exports.permute = void 0;
// Boris Yuzhakov's one liner.

@@ -4,0 +5,0 @@ function permute(a) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.regex = void 0;
const capture_1 = require("./capture");

@@ -4,0 +5,0 @@ const results_1 = require("../results");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.func = exports.object = exports.string = exports.bool = exports.number = void 0;
const capture_1 = require("./capture");

@@ -4,0 +5,0 @@ const results_1 = require("../results");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getParams = void 0;
function getParams(params) {

@@ -4,0 +5,0 @@ return typeof params === "string"

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.wrap = void 0;
const parse_1 = require("../parse");

@@ -4,0 +5,0 @@ const utils_1 = require("./utils");

import { Result } from "../results";
import { Value, IParams, AnySchema, ParseFunc, IMeta } from "../types";
import { Value, IContext, IParams, AnySchema, ParseFunc, IMeta } from "../types";
import { Schema } from "../schemas";

@@ -17,2 +17,2 @@ export declare function toNeedledSchema(schema: AnySchema | ArrayItemSchema, params?: IParams): ArrayItemSchema;

}
export default function (schema: Schema<Array<any>>): (obj: Value, key: string, parents: Value[], parentKeys: string[]) => (context: any) => Result;
export default function (schema: Schema<Array<any>>): (obj: Value, key: string, parents: Value[], parentKeys: string[]) => (context: IContext) => Result;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ArrayResult = exports.ArrayItemSchema = exports.toNeedledSchema = void 0;
const results_1 = require("../results");

@@ -4,0 +5,0 @@ const parse_1 = require("../parse");

import { Schema } from "../schemas";
import { Value, ParseFunc } from "../types";
export default function (schema: Schema<ParseFunc<any, any>>): (_obj: Value, key: string, parents: Value[], parentKeys: string[]) => (context: any) => any;
import { Value, IContext, ParseFunc } from "../types";
export default function (schema: Schema<ParseFunc<any, any>>): (_obj: Value, key: string, parents: Value[], parentKeys: string[]) => (context: IContext) => any;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.wrapSchemaIfLiteralChild = void 0;
const schemas_1 = require("../schemas");

@@ -4,0 +5,0 @@ function wrapSchemaIfLiteralChild(schema, childSchema) {

import { Match, Empty, Skip, Fault } from "../results";
import { Schema } from "../schemas";
import { Value } from "../types";
export default function (schema: Schema<any>): (_obj: Value, key: string, parents: Value[], parentKeys: string[]) => (context: any) => Match | Empty | Skip | Fault;
import { Value, IContext } from "../types";
export default function (schema: Schema<any>): (_obj: Value, key: string, parents: Value[], parentKeys: string[]) => (context: IContext) => Match | Empty | Skip | Fault;
import { Empty, Skip } from "../results";
import { Schema } from "../schemas";
import { Value, Primitive } from "../types";
export default function (schema: Schema<Primitive>): (_obj: Value, key: string, parents: Value[], parentKeys: string[]) => (context: any) => Empty | Skip;
import { Value, IContext, Primitive } from "../types";
export default function (schema: Schema<Primitive>): (_obj: Value, key: string, parents: Value[], parentKeys: string[]) => (context: IContext) => Empty | Skip;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Skip = exports.Fault = exports.Empty = exports.Match = exports.Result = void 0;
var Result_1 = require("./Result");
exports.Result = Result_1.default;
Object.defineProperty(exports, "Result", { enumerable: true, get: function () { return Result_1.default; } });
var Match_1 = require("./Match");
exports.Match = Match_1.default;
Object.defineProperty(exports, "Match", { enumerable: true, get: function () { return Match_1.default; } });
var Empty_1 = require("./Empty");
exports.Empty = Empty_1.default;
Object.defineProperty(exports, "Empty", { enumerable: true, get: function () { return Empty_1.default; } });
var Fault_1 = require("./Fault");
exports.Fault = Fault_1.default;
Object.defineProperty(exports, "Fault", { enumerable: true, get: function () { return Fault_1.default; } });
var Skip_1 = require("./Skip");
exports.Skip = Skip_1.default;
Object.defineProperty(exports, "Skip", { enumerable: true, get: function () { return Skip_1.default; } });
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toSchema = exports.isLiteralArraySchema = exports.isLiteralObjectSchema = exports.isPrimitiveSchema = exports.FunctionSchema = exports.PrimitiveSchema = exports.ObjectSchema = exports.ArraySchema = exports.Schema = void 0;
const Schema_1 = require("./Schema");

@@ -10,11 +11,11 @@ const ArraySchema_1 = require("./ArraySchema");

var Schema_2 = require("./Schema");
exports.Schema = Schema_2.default;
Object.defineProperty(exports, "Schema", { enumerable: true, get: function () { return Schema_2.default; } });
var ArraySchema_2 = require("./ArraySchema");
exports.ArraySchema = ArraySchema_2.default;
Object.defineProperty(exports, "ArraySchema", { enumerable: true, get: function () { return ArraySchema_2.default; } });
var ObjectSchema_2 = require("./ObjectSchema");
exports.ObjectSchema = ObjectSchema_2.default;
Object.defineProperty(exports, "ObjectSchema", { enumerable: true, get: function () { return ObjectSchema_2.default; } });
var PrimitiveSchema_2 = require("./PrimitiveSchema");
exports.PrimitiveSchema = PrimitiveSchema_2.default;
Object.defineProperty(exports, "PrimitiveSchema", { enumerable: true, get: function () { return PrimitiveSchema_2.default; } });
var FunctionSchema_2 = require("./FunctionSchema");
exports.FunctionSchema = FunctionSchema_2.default;
Object.defineProperty(exports, "FunctionSchema", { enumerable: true, get: function () { return FunctionSchema_2.default; } });
function isPrimitiveSchema(x) {

@@ -21,0 +22,0 @@ return [

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

import { IParams, IMeta, Value, SchemaParser, AnySchema } from "../types";
import { IParams, IMeta, Value, IContext, SchemaParser, AnySchema } from "../types";
import { Result } from "../results";

@@ -10,3 +10,3 @@ export declare type FnGetSchemaForResult = (result: Result) => AnySchema;

abstract getParseFunc(): SchemaParser<T, any, any>;
then(fnSuccessSchema: FnGetSchemaForResult, fnFailSchema?: FnGetSchemaForResult): (obj: Value, key: string, parents: Value[], parentKeys: string[]) => (context: any) => any;
then(fnSuccessSchema: FnGetSchemaForResult, fnFailSchema?: FnGetSchemaForResult): (obj: Value, key: string, parents: Value[], parentKeys: string[]) => (context: IContext) => any;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.shallowClone = void 0;
function shallowClone(obj) {

@@ -4,0 +5,0 @@ return typeof obj === "object" && obj.constructor === Object

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isObject = void 0;
function isObject(obj) {

@@ -4,0 +5,0 @@ return typeof obj === "object" && obj.constructor === Object;

{
"name": "chimpanzee",
"version": "1.0.2",
"version": "1.0.3",
"author": "Jeswin Kumar<jeswinpk@agilehead.com>",
"repository": {
"type": "git",
"url": "https://github.com/jeswin/chimpanzee"
},
"scripts": {

@@ -12,11 +16,11 @@ "build": "./build.sh",

"dependencies": {
"lazily": "^1.0.1"
"lazily": "1.0.1"
},
"devDependencies": {
"@types/mocha": "^8.0.2",
"@types/should": "^13.0.0",
"mocha": "^8.1.1",
"should": "^13.2.3"
"@types/mocha": "8.0.2",
"@types/should": "13.0.0",
"mocha": "8.1.1",
"should": "13.2.3"
},
"license": "MIT"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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