schemaglobin
Advanced tools
Comparing version 5.9.0 to 5.10.0
@@ -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; |
"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>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
149987
2762