How to use the @terascope/job-components.isEmpty function in @terascope/job-components

To help you get started, we’ve selected a few @terascope/job-components examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github terascope / teraslice / packages / teraslice-client-js / src / assets.ts View on Github external
async post(data: PostData, options: RequestOptions = {}): Promise {
        if (isEmpty(data)) throw new TSError('Asset stream must not be empty');
        const results = await super.post('/assets', data, options);
        return this.parse(results);
    }
github terascope / teraslice / packages / teraslice-client-js / src / assets.ts View on Github external
async delete(id: string, searchOptions: SearchOptions = {}): Promise {
        if (isEmpty(id)) throw new TSError('Asset delete requires a ID');
        const results = await super.delete(`/assets/${id}`, searchOptions);
        return this.parse(results);
    }