UNPKG

@splidejs/splide

Version:

Splide is a lightweight, flexible and accessible slider/carousel. No dependencies, no Lighthouse errors.

15 lines (13 loc) 456 B
import { toArray } from '../../array'; import { ownKeys } from '../ownKeys/ownKeys'; /** * Deletes specified own keys from the object. * * @param object - An object. * @param keys - A key or keys to delete. If not specified, all own enumerable keys will be deleted. */ export function omit( object: object, keys?: string | string[] ): void { toArray( keys || ownKeys( object ) ).forEach( key => { delete object[ key ]; } ); }