File "omit.ts"
Full path: /home/fsibplc/public_html/sommilito-bank2/splide-4.1.3/src/js/utils/object/omit/omit.ts
File
size: 432 B (432 B bytes)
MIME-type: text/x-java
Charset: utf-8
Download Open Edit Advanced Editor Back
import { forEach } 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 {
forEach( keys || ownKeys( object ), key => {
delete object[ key ];
} );
}