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

schemaglobin

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

schemaglobin - npm Package Compare versions

Comparing version 5.9.0 to 5.10.0

20

dist/helpers/object.d.ts

@@ -10,5 +10,21 @@ import type { UnknownObject } from "../types";

/** Extract the key from an object entry. */
export declare const getEntryKey: ([k]: [string, unknown]) => string;
export declare const getEntryKey: (entry: [string, unknown]) => string;
/** Extract the value from an object entry. */
export declare const getEntryValue: <V>([, p]: [string, V]) => V;
export declare const getEntryValue: <V>(entry: [string, V]) => V;
/** Extract a date property from an object entry. */
export declare const getEntryDate: <V extends {
date: string | number | Date;
}>(entry: [string, V]) => string | number | Date;
/** Extract an order property from an object entry. */
export declare const getEntryOrder: <V extends {
order: number;
}>(entry: [string, V]) => number;
/** Extract a title property from an object entry. */
export declare const getEntryTitle: <V extends {
title: string;
}>(entry: [string, V]) => string | number;
/** Extract a name property from an object entry. */
export declare const getEntryName: <V extends {
name: string;
}>(entry: [string, V]) => string | number;
/** Symbol that allows you to filter out results during mapping. */

@@ -15,0 +31,0 @@ export declare const SKIP: unique symbol;

14

dist/helpers/object.js
"use strict";
/* eslint-disable no-param-reassign */
Object.defineProperty(exports, "__esModule", { value: true });
exports.getProp = exports.updateProp = exports.setProp = exports.deleteProp = exports.resolveObject = exports.objectFromKeys = exports.mapObjectKeys = exports.mapObject = exports.SKIP = exports.getEntryValue = exports.getEntryKey = exports.objectFromEntries = exports.isObject = void 0;
exports.getProp = exports.updateProp = exports.setProp = exports.deleteProp = exports.resolveObject = exports.objectFromKeys = exports.mapObjectKeys = exports.mapObject = exports.SKIP = exports.getEntryName = exports.getEntryTitle = exports.getEntryOrder = exports.getEntryDate = exports.getEntryValue = exports.getEntryKey = exports.objectFromEntries = exports.isObject = void 0;
/** Is a value an unknown object? (is a TypeScript assertion object that asserts various things). */

@@ -22,5 +22,13 @@ exports.isObject = (value) => typeof value === "object" && value !== null;

/** Extract the key from an object entry. */
exports.getEntryKey = ([k]) => k;
exports.getEntryKey = (entry) => entry[0];
/** Extract the value from an object entry. */
exports.getEntryValue = ([, p]) => p;
exports.getEntryValue = (entry) => entry[1];
/** Extract a date property from an object entry. */
exports.getEntryDate = (entry) => entry[1].date;
/** Extract an order property from an object entry. */
exports.getEntryOrder = (entry) => entry[1].order;
/** Extract a title property from an object entry. */
exports.getEntryTitle = (entry) => entry[1].title;
/** Extract a name property from an object entry. */
exports.getEntryName = (entry) => entry[1].name;
/** Symbol that allows you to filter out results during mapping. */

@@ -27,0 +35,0 @@ exports.SKIP = Symbol("schemaglobin/object/SKIP");

{
"name": "schemaglobin",
"description": "Validate user-entered data.",
"version": "5.9.0",
"version": "5.10.0",
"repository": "https://github.com/dhoulb/schemaglobin",

@@ -6,0 +6,0 @@ "author": "Dave Houlbrooke <dave@shax.com>",

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