文件操作 - trim.d.ts
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/type-fest/source/trim.d.ts
编辑文件内容
import type {Whitespace} from './internal'; /** Remove spaces from the left side. */ type TrimLeft<V extends string> = V extends `${Whitespace}${infer R}` ? TrimLeft<R> : V; /** Remove spaces from the right side. */ type TrimRight<V extends string> = V extends `${infer R}${Whitespace}` ? TrimRight<R> : V; /** Remove leading and trailing spaces from a string. @example ``` import type {Trim} from 'type-fest'; Trim<' foo '> //=> 'foo' ``` @category String @category Template literal */ export type Trim<V extends string> = TrimLeft<TrimRight<V>>;
修改文件时间
将文件时间修改为当前时间的前一年
删除文件