Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cedx/enum

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cedx/enum - npm Package Compare versions

Comparing version 6.3.0 to 7.0.0

2

build/enum.min.js

@@ -1,1 +0,1 @@

!function(e){"use strict";const t=Symbol("Enum");function n(e){return Reflect.has(e,t)&&!0===Reflect.get(e,t)}function r(e){return Object.values(e).every(e=>"string"==typeof e)}class s{static assert(e,t){if(s.isDefined(e,t))return t;throw new TypeError(`Invalid enumerated value: ${t}`)}static coerce(e,t,n){return s.isDefined(e,t)?t:n}static create(e){const n={};Reflect.defineProperty(n,t,{value:!0});const r=["bigint","boolean","number","string"];for(const[t,s]of Object.entries(e))r.includes(typeof s)&&Reflect.defineProperty(n,t,{enumerable:!0,value:s});const i=["assert","coerce","entries","getIndex","getName","isDefined","names","values"];for(const e of i){const t=Reflect.get(s,e).bind(n,n);Reflect.defineProperty(n,e,{value:t})}return Object.freeze(n)}static entries(e){return n(e)||r(e)?Object.entries(e):s.names(e).map(t=>[t,Reflect.get(e,t)])}static getIndex(e,t){return s.values(e).indexOf(t)}static getName(e,t){const n=s.getIndex(e,t);return n>=0?s.names(e)[n]:""}static isDefined(e,t){return s.values(e).includes(t)}static names(e){return n(e)||r(e)?Object.keys(e):Object.values(e).filter(e=>"string"==typeof e)}static values(e){return n(e)||r(e)?Object.values(e):Object.values(e).filter(e=>"number"==typeof e)}}e.Enum=s}(this.window=this.window||{});
!function(e){"use strict";const t=Symbol("Enum");function n(e){return Reflect.has(e,t)&&!0===Reflect.get(e,t)}function r(e){return Object.values(e).every(e=>"string"==typeof e)}class s{static assert(e,t){if(s.isDefined(e,t))return t;throw new TypeError("Invalid enumerated value: "+t)}static coerce(e,t,n){return s.isDefined(e,t)?t:n}static create(e){const n={};Reflect.defineProperty(n,t,{value:!0});const r=["bigint","boolean","number","string"];for(const[t,s]of Object.entries(e))r.includes(typeof s)&&Reflect.defineProperty(n,t,{enumerable:!0,value:s});const i=["assert","coerce","entries","getIndex","getName","isDefined","names","values"];for(const e of i){const t=Reflect.get(s,e).bind(n,n);Reflect.defineProperty(n,e,{value:t})}return Object.freeze(n)}static entries(e){return n(e)||r(e)?Object.entries(e):s.names(e).map(t=>[t,Reflect.get(e,t)])}static getIndex(e,t){return s.values(e).indexOf(t)}static getName(e,t){const n=s.getIndex(e,t);return n>=0?s.names(e)[n]:""}static isDefined(e,t){return s.values(e).includes(t)}static names(e){return n(e)||r(e)?Object.keys(e):Object.values(e).filter(e=>"string"==typeof e)}static values(e){return n(e)||r(e)?Object.values(e):Object.values(e).filter(e=>"number"==typeof e)}}e.Enum=s}(this.window=this.window||{});
# Changelog
## Version [6.3.0](https://github.com/cedx/enum.js/compare/v6.2.0...v6.3.0)
## Version [7.0.0](https://git.belin.io/cedx/enum.js/compare/v6.3.0...v7.0.0)
- Breaking change: raised the required [Node.js](https://nodejs.org) version.
- Dropped support for [GitHub Packages](https://github.com/features/packages).
- Updated the documentation.
- Updated the package dependencies.
## Version [6.2.0](https://github.com/cedx/enum.js/compare/v6.1.1...v6.2.0)
## Version [6.3.0](https://git.belin.io/cedx/enum.js/compare/v6.2.0...v6.3.0)
- Updated the package dependencies.
## Version [6.2.0](https://git.belin.io/cedx/enum.js/compare/v6.1.1...v6.2.0)
- Added [`BigInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) to the values to be retained.
- Replaced [`babel-minify`](https://github.com/babel/minify) by [`terser`](https://terser.org) for minification.
## Version [6.1.1](https://github.com/cedx/enum.js/compare/v6.1.0...v6.1.1)
- Fixed the [issue #4](https://github.com/cedx/enum.js/issues/4): [Microsoft Edge](https://www.microsoft.com/en-us/windows/microsoft-edge) does not support object spread properties.
## Version [6.1.1](https://git.belin.io/cedx/enum.js/compare/v6.1.0...v6.1.1)
- Fixed the [issue #4](https://git.belin.io/cedx/enum.js/issues/4): [Microsoft Edge](https://www.microsoft.com/en-us/windows/microsoft-edge) does not support object spread properties.
## Version [6.1.0](https://github.com/cedx/enum.js/compare/v6.0.0...v6.1.0)
## Version [6.1.0](https://git.belin.io/cedx/enum.js/compare/v6.0.0...v6.1.0)
- Added support for [TypeScript enums](https://www.typescriptlang.org/docs/handbook/enums.html).

@@ -19,3 +25,3 @@ - Due to strong user demand, restored the [TypeScript](https://www.typescriptlang.org) source code.

## Version [6.0.0](https://github.com/cedx/enum.js/compare/v5.5.0...v6.0.0)
## Version [6.0.0](https://git.belin.io/cedx/enum.js/compare/v5.5.0...v6.0.0)
- Breaking change: dropped support for [CommonJS modules](https://nodejs.org/api/modules.html).

@@ -28,7 +34,7 @@ - Breaking change: raised the required [Node.js](https://nodejs.org) version.

## Version [5.5.0](https://github.com/cedx/enum.js/compare/v5.4.0...v5.5.0)
## Version [5.5.0](https://git.belin.io/cedx/enum.js/compare/v5.4.0...v5.5.0)
- Modified the package layout.
- Updated the package dependencies.
## Version [5.4.0](https://github.com/cedx/enum.js/compare/v5.3.0...v5.4.0)
## Version [5.4.0](https://git.belin.io/cedx/enum.js/compare/v5.3.0...v5.4.0)
- Added support for [ECMAScript modules](https://nodejs.org/api/esm.html).

@@ -38,16 +44,16 @@ - Replaced the [Webpack](https://webpack.js.org) bundler by [Rollup](https://rollupjs.org) and [Babel Minify](https://github.com/babel/minify).

## Version [5.3.0](https://github.com/cedx/enum.js/compare/v5.2.0...v5.3.0)
## Version [5.3.0](https://git.belin.io/cedx/enum.js/compare/v5.2.0...v5.3.0)
- Updated the package dependencies.
- Updated the URL of the Git repository.
## Version [5.2.0](https://github.com/cedx/enum.js/compare/v5.1.1...v5.2.0)
## Version [5.2.0](https://git.belin.io/cedx/enum.js/compare/v5.1.1...v5.2.0)
- Added support for a redistributable bundle.
## Version [5.1.1](https://github.com/cedx/enum.js/compare/v5.1.0...v5.1.1)
- Fixed the [issue #2](https://github.com/cedx/enum.js/issues/2): relaxed the engine constraint.
## Version [5.1.1](https://git.belin.io/cedx/enum.js/compare/v5.1.0...v5.1.1)
- Fixed the [issue #2](https://git.belin.io/cedx/enum.js/issues/2): relaxed the engine constraint.
## Version [5.1.0](https://github.com/cedx/enum.js/compare/v5.0.0...v5.1.0)
## Version [5.1.0](https://git.belin.io/cedx/enum.js/compare/v5.0.0...v5.1.0)
- Updated the package dependencies.
## Version [5.0.0](https://github.com/cedx/enum.js/compare/v4.1.0...v5.0.0)
## Version [5.0.0](https://git.belin.io/cedx/enum.js/compare/v4.1.0...v5.0.0)
- Breaking change: ported the source code to [TypeScript](https://www.typescriptlang.org).

@@ -60,9 +66,9 @@ - Added an example code.

## Version [4.1.0](https://github.com/cedx/enum.js/compare/v4.0.0...v4.1.0)
## Version [4.1.0](https://git.belin.io/cedx/enum.js/compare/v4.0.0...v4.1.0)
- Updated the package dependencies.
## Version [4.0.0](https://github.com/cedx/enum.js/compare/v3.3.0...v4.0.0)
## Version [4.0.0](https://git.belin.io/cedx/enum.js/compare/v3.3.0...v4.0.0)
- Breaking change: dropped the `get` prefix from the `getEntries()`, `getNames()` and `getValues()` methods of the enumerated types.
## Version [3.3.0](https://github.com/cedx/enum.js/compare/v3.2.0...v3.3.0)
## Version [3.3.0](https://git.belin.io/cedx/enum.js/compare/v3.2.0...v3.3.0)
- Added a user guide based on [MkDocs](http://www.mkdocs.org).

@@ -72,11 +78,11 @@ - Updated the build system to [Gulp](https://gulpjs.com) version 4.

## Version [3.2.0](https://github.com/cedx/enum.js/compare/v3.1.0...v3.2.0)
## Version [3.2.0](https://git.belin.io/cedx/enum.js/compare/v3.1.0...v3.2.0)
- Added support for browser testing.
- Updated the package dependencies.
## Version [3.1.0](https://github.com/cedx/enum.js/compare/v3.0.0...v3.1.0)
## Version [3.1.0](https://git.belin.io/cedx/enum.js/compare/v3.0.0...v3.1.0)
- Changed licensing for the [MIT License](https://opensource.org/licenses/MIT).
- Updated the package dependencies.
## Version [3.0.0](https://github.com/cedx/enum.js/compare/v2.4.0...v3.0.0)
## Version [3.0.0](https://git.belin.io/cedx/enum.js/compare/v2.4.0...v3.0.0)
- Added the `assert()` method.

@@ -87,24 +93,24 @@ - Added the `coerce()` method.

## Version [2.4.0](https://github.com/cedx/enum.js/compare/v2.3.0...v2.4.0)
## Version [2.4.0](https://git.belin.io/cedx/enum.js/compare/v2.3.0...v2.4.0)
- Removed the dependency on [Babel](https://babeljs.io) compiler.
- Updated the package dependencies.
## Version [2.3.0](https://github.com/cedx/enum.js/compare/v2.2.1...v2.3.0)
## Version [2.3.0](https://git.belin.io/cedx/enum.js/compare/v2.2.1...v2.3.0)
- Updated the package dependencies.
## Version [2.2.1](https://github.com/cedx/enum.js/compare/v2.2.0...v2.2.1)
## Version [2.2.1](https://git.belin.io/cedx/enum.js/compare/v2.2.0...v2.2.1)
- Fixed a code generation bug.
- Updated the package dependencies.
## Version [2.2.0](https://github.com/cedx/enum.js/compare/v2.1.0...v2.2.0)
## Version [2.2.0](https://git.belin.io/cedx/enum.js/compare/v2.1.0...v2.2.0)
- Added support for the [Node Security Platform](https://nodesecurity.io) reports.
- Updated the package dependencies.
## Version [2.1.0](https://github.com/cedx/enum.js/compare/v2.0.1...v2.1.0)
## Version [2.1.0](https://git.belin.io/cedx/enum.js/compare/v2.0.1...v2.1.0)
- Updated the package dependencies.
## Version [2.0.1](https://github.com/cedx/enum.js/compare/v2.0.0...v2.0.1)
## Version [2.0.1](https://git.belin.io/cedx/enum.js/compare/v2.0.0...v2.0.1)
- Fixed the build system.
## Version [2.0.0](https://github.com/cedx/enum.js/compare/v1.3.0...v2.0.0)
## Version [2.0.0](https://git.belin.io/cedx/enum.js/compare/v1.3.0...v2.0.0)
- Breaking change: raised the required [Node.js](https://nodejs.org) version.

@@ -116,10 +122,10 @@ - Breaking change: using ES2017 features, like async/await functions.

## Version [1.3.0](https://github.com/cedx/enum.js/compare/v1.2.0...v1.3.0)
## Version [1.3.0](https://git.belin.io/cedx/enum.js/compare/v1.2.0...v1.3.0)
- Updated the package dependencies.
## Version [1.2.0](https://github.com/cedx/enum.js/compare/v1.1.0...v1.2.0)
## Version [1.2.0](https://git.belin.io/cedx/enum.js/compare/v1.1.0...v1.2.0)
- Replaced the [Codacy](https://www.codacy.com) code coverage service by the [Coveralls](https://coveralls.io) one.
- Updated the package dependencies.
## Version [1.1.0](https://github.com/cedx/enum.js/compare/v1.0.0...v1.1.0)
## Version [1.1.0](https://git.belin.io/cedx/enum.js/compare/v1.0.0...v1.1.0)
- Non-scalar values are excluded from the iteration of enumerable properties.

@@ -126,0 +132,0 @@

@@ -132,3 +132,3 @@ /** Provides helper methods for enumerations. */

/** A value of an enumerated type. */
export declare type EnumValue = boolean | number | string;
export declare type EnumValue = bigint | boolean | number | string;
/**

@@ -135,0 +135,0 @@ * Defines the values of an enumerated type.

@@ -1,1 +0,1 @@

export * from './enum';
export * from './enum.js';
{
"bugs": "https://github.com/cedx/enum.js/issues",
"bugs": "https://git.belin.io/cedx/enum.js/issues",
"description": "A simple implementation of enumerated types.",
"homepage": "https://dev.belin.io/enum.js",
"homepage": "https://docs.belin.io/enum.js",
"license": "MIT",
"main": "lib/index.js",
"name": "@cedx/enum",
"repository": "github:cedx/enum.js",
"type": "module",
"types": "lib/index.d.ts",
"version": "6.3.0",
"version": "7.0.0",
"author": {

@@ -19,19 +18,17 @@ "email": "cedric@belin.io",

"@cedx/coveralls": "^9.4.0",
"@types/node": "^13.9.3",
"@typescript-eslint/eslint-plugin": "^2.24.0",
"@typescript-eslint/parser": "^2.24.0",
"@types/node": "^13.13.4",
"@typescript-eslint/eslint-plugin": "^2.29.0",
"@typescript-eslint/parser": "^2.29.0",
"c8": "^7.1.0",
"chai": "^4.2.0",
"del": "^5.1.0",
"eslint": "^6.8.0",
"gulp": "^4.0.2",
"gulp-replace": "^1.0.0",
"mocha": "^7.1.1",
"rollup": "^2.1.0",
"terser": "^4.6.7",
"typedoc": "^0.17.3",
"mocha": "^7.1.2",
"rollup": "^2.7.2",
"terser": "^4.6.12",
"typedoc": "^0.17.6",
"typescript": "^3.8.3"
},
"engines": {
"node": ">=12.16.0"
"node": ">=14.0.0"
},

@@ -54,2 +51,6 @@ "files": [

],
"repository": {
"type": "git",
"url": "https://git.belin.io/cedx/enum.js.git"
},
"scripts": {

@@ -56,0 +57,0 @@ "coverage": "gulp coverage",

@@ -9,12 +9,11 @@ # Enums for JS

## Documentation
- [User guide](https://dev.belin.io/enum.js)
- [API reference](https://dev.belin.io/enum.js/api)
- [User guide](https://docs.belin.io/enum.js)
- [API reference](https://api.belin.io/enum.js)
## Development
- [Git repository](https://github.com/cedx/enum.js)
- [GitHub package](https://github.com/cedx/enum.js/packages)
- [Git repository](https://git.belin.io/cedx/enum.js)
- [npm package](https://www.npmjs.com/package/@cedx/enum)
- [Submit an issue](https://github.com/cedx/enum.js/issues)
- [Submit an issue](https://git.belin.io/cedx/enum.js/issues)
## License
[Enums for JS](https://dev.belin.io/enum.js) is distributed under the MIT License.
[Enums for JS](https://docs.belin.io/enum.js) is distributed under the MIT License.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc