@eslint-react/tools
Advanced tools
Comparing version 1.5.3 to 1.5.4-next.0
'use strict'; | ||
/** | ||
* @since 0.4.0 | ||
*/ /** | ||
* Infers embedded primitive type of any type | ||
* Same as `as const` but without setting the object as readonly and without needing the user to use it. | ||
* @since 0.0.1 | ||
* @param a Value to infer | ||
* @returns Value with embedded type inferred | ||
* @example | ||
* const result = narrow(['foo', 'bar', 1]) | ||
*/ const narrow = (a)=>a; | ||
/** | ||
* @param a The value to infer. | ||
* @since 0.0.1 | ||
*/ const asConst = (a)=>a; | ||
// fromEntries<T>(obj: T): FromEntriesWithReadOnly<T> | ||
/* eslint-disable @susisu/safe-typescript/no-type-assertion */ /** | ||
* type-safe version of Object.fromEntries | ||
* @param entries The entries to create the object from. | ||
* @returns The object created from the entries. | ||
* @since 0.4.0 | ||
*/ const fromEntries = (entries)=>{ | ||
return Object.fromEntries(entries); | ||
// src/index.ts | ||
var narrow = (a) => a; | ||
var asConst = (a) => a; | ||
var fromEntries = (entries2) => { | ||
return Object.fromEntries(entries2); | ||
}; | ||
/** | ||
* type-safe version of Object.entries | ||
* @param value The value to get the entries from. | ||
* @returns The entries of the value. | ||
* @since 0.4.0 | ||
*/ const entries = (value)=>{ | ||
return Object.entries(value); | ||
var entries = (value) => { | ||
return Object.entries(value); | ||
}; | ||
/** | ||
* type-safe version of Object.keys | ||
* @param value The value to get the keys from. | ||
* @returns The keys of the value. | ||
* @since 0.4.0 | ||
*/ const keys = (value)=>Object.keys(value); | ||
/** | ||
* type-safe version of Object.values | ||
* @param value The value to get the values from. | ||
* @returns The values of the value. | ||
* @since 0.4.0 | ||
*/ const values = (value)=>Object.values(value); /* eslint-enable @susisu/safe-typescript/no-type-assertion */ | ||
var keys = (value) => Object.keys(value); | ||
var values = (value) => Object.values(value); | ||
@@ -48,0 +15,0 @@ exports.asConst = asConst; |
{ | ||
"name": "@eslint-react/tools", | ||
"version": "1.5.3", | ||
"version": "1.5.4-next.0", | ||
"description": "ESLint React's std library and primitives.", | ||
@@ -38,3 +38,3 @@ "homepage": "https://github.com/rel1cx/eslint-react", | ||
"scripts": { | ||
"build": "rollup -c rollup.config.ts --configPlugin swc3 && cp dist/index.d.ts dist/index.d.mts", | ||
"build": "tsup", | ||
"build:docs": "typedoc", | ||
@@ -41,0 +41,0 @@ "lint:publish": "publint", |
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
9823
6
137
1