From d651df1c759328ca40bbe4f37a935852fe97c4c7 Mon Sep 17 00:00:00 2001 From: Ruslan Lopatin Date: Fri, 26 May 2023 09:19:44 +0700 Subject: [PATCH] Drop `MimeType` enum --- src/mime-type.spec.ts | 13 -------- src/mime-type.ts | 71 ------------------------------------------- src/mod.ts | 1 - 3 files changed, 85 deletions(-) delete mode 100644 src/mime-type.spec.ts delete mode 100644 src/mime-type.ts diff --git a/src/mime-type.spec.ts b/src/mime-type.spec.ts deleted file mode 100644 index 852ca36..0000000 --- a/src/mime-type.spec.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { describe, expect, it } from '@jest/globals'; -import { MIMEType } from './mime-type.js'; - -describe('MIME', () => { - it('contains JSON definitions', () => { - expect(MIMEType.JSON).toBe('application/json'); - expect(MIMEType.TextJSON).toBe('text/json'); - }); - it('contains XML definitions', () => { - expect(MIMEType.XML).toBe('application/xml'); - expect(MIMEType.TextXML).toBe('text/xml'); - }); -}); diff --git a/src/mime-type.ts b/src/mime-type.ts deleted file mode 100644 index b58ab6e..0000000 --- a/src/mime-type.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Select MIME type. - */ -export enum MIMEType { - /** - * `text/css` - */ - CSS = 'text/css', - - /** - * `multipart/form-data`. - */ - FormData = 'multipart/form-data', - - /** - * `application/x-www-form-urlencoded` - */ - FormURLEncoded = 'application/x-www-form-urlencoded', - - /** - * `text/html` - */ - HTML = 'text/html', - - /** - * `text/javascript` - */ - JavaScript = 'text/javascript', - - /** - * `application/json` - */ - JSON = 'application/json', - - /** - * `text/json`. The correct JSON MIME is {@link MIMEType.JSON application/json} - */ - TextJSON = 'text/json', - - /** - * `application/octet-stream` - */ - OctetStream = 'application/octet-stream', - - /** - * `image/svg+xml` - */ - SVG = 'image/svg+xml', - - /** - * `text/plain` - */ - Text = 'text/plain', - - /** - * `application/xhtml+xml` - */ - XHTML = 'application/xhtml+xml', - - /** - * `application/xml` - if _not_ readable from casual users ([RFC 3023](https://tools.ietf.org/html/rfc3023#section-3), - * section 3) - */ - XML = 'application/xml', - - /** - * `text/xml` - if readable from casual users ([RFC 3023](https://tools.ietf.org/html/rfc3023#section-3), - * section 3) - */ - TextXML = 'text/xml', -} diff --git a/src/mod.ts b/src/mod.ts index abf66bf..e1784b4 100644 --- a/src/mod.ts +++ b/src/mod.ts @@ -6,6 +6,5 @@ export * from './css-val.js'; export * from './css.js'; export * from './hyphenate.js'; export * from './js.js'; -export * from './mime-type.js'; export * from './uri.js'; export * from './xml.js';