This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Unpacked<T> = | |
T extends (infer U)[] | |
? U | |
: T extends (...args: any[]) => infer U | |
? U | |
: T extends Promise<infer U> | |
? U | |
: T |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Unpacked<T> = | |
T extends (infer U)[] | |
? U | |
: T extends (...args: any[]) => infer U | |
? U | |
: T extends Promise<infer U> | |
? U | |
: T |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
code adapted from "locale2" v2.3.1 | |
- https://www.npmjs.com/package/locale2 | |
- https://github.com/moimikey/locale2 | |
- adapted by Chase Moskal (@chase-moskal) | |
------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type Validator<xValue> = (value: xValue) => string[] | |
export function validator<xValue>(...conditions: Validator<xValue>[]): Validator<xValue> { | |
return value => { | |
const problems: string[] = [] | |
for (const condition of conditions) { | |
for (const problem of condition(value)) | |
problems.push(problem) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "nailcareer.com", | |
"version": "0.2.48", | |
"lockfileVersion": 2, | |
"requires": true, | |
"packages": { | |
"": { | |
"name": "nailcareer.com", | |
"version": "0.2.48", | |
"license": "UNLICENSED", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ node -v | |
v20.6.0 | |
❯ npm run build | |
> @benev/[email protected] build | |
> run-s clean compile permissions demo | |
> @benev/[email protected] clean | |
> rm -rf x && mkdir x |