From c21d60e61abf5d5d709eb4668665c8e0d36ec057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Belin?= Date: Thu, 10 Nov 2016 21:27:49 +0100 Subject: [PATCH] Added a dedicated enumeration API to the `CommentType` type --- CHANGELOG.md | 3 +++ package.json | 3 ++- src/comment_type.js | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 528a7771..a16ab957 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog This file contains highlights of what changes on each version of the [Akismet for JS](https://github.com/cedx/akismet.js) library. +## Version 2.0.1 +- Added a dedicated enumeration API to the `CommentType` type. + ## Version 2.0.0 - Breaking change: removed the `Client.serviceURL` property. - Breaking change: removed the `EndPoints` enumeration. diff --git a/package.json b/package.json index 7c93c9a3..d6189dbe 100644 --- a/package.json +++ b/package.json @@ -7,12 +7,13 @@ "bugs": "https://github.com/cedx/akismet.js/issues", "license": "Apache-2.0", "repository": "cedx/akismet.js", - "version": "2.0.0", + "version": "2.0.1", "jsnext:main": "./src/index", "main": "./lib/index", "dependencies": { + "@cedx/enum": "^1.0.0", "rxjs": "^5.0.0-rc.2", "superagent": "^2.3.0" }, diff --git a/src/comment_type.js b/src/comment_type.js index 9d078332..187f79b4 100644 --- a/src/comment_type.js +++ b/src/comment_type.js @@ -1,3 +1,5 @@ +import {Enum} from '@cedx/enum'; + /** * Specifies the type of a comment. * @type {object} @@ -6,7 +8,7 @@ * @property {string} PINGBACK A [pingback](https://en.wikipedia.org/wiki/Pingback) comment. * @property {string} TRACKBACK A [trackback](https://en.wikipedia.org/wiki/Trackback) comment. */ -export const CommentType = Object.freeze({ +export const CommentType = Enum.create({ COMMENT: 'comment', PINGBACK: 'pingback', TRACKBACK: 'trackback'