New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@gradecam/tsenum

Package Overview
Dependencies
Maintainers
5
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gradecam/tsenum - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

3

dist/index.d.ts

@@ -18,2 +18,5 @@ /**

*
* You can also pass in multiple objects (or multiple enums created with this
* helper) and the result will combine them with the actual value using Object.assign
*
* @param x Enum object to create a typed enum for

@@ -20,0 +23,0 @@ */

@@ -1,6 +0,55 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function MakeEnum(...x) {
return Object.freeze(Object.assign({}, ...x));
}
exports.MakeEnum = MakeEnum;
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var freeze = function freezeDefault(obj) {
return Object.freeze.apply(Object, arguments);
};
if (typeof Object.freeze !== 'function') {
// Fallback in case Object.freeze isn't supported
freeze = function (v) { return v; };
}
// Object.assign polyfill taken from
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill
if (typeof Object.assign !== 'function') {
// Must be writable: true, enumerable: false, configurable: true
Object.defineProperty(Object, "assign", {
value: function assign(target, varArgs) {
'use strict';
if (target === null || target === undefined) {
throw new TypeError('Cannot convert undefined or null to object');
}
var to = Object(target);
for (var index = 1; index < arguments.length; index++) {
var nextSource = arguments[index];
if (nextSource !== null && nextSource !== undefined) {
for (var nextKey in nextSource) {
// Avoid bugs when hasOwnProperty is shadowed
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
to[nextKey] = nextSource[nextKey];
}
}
}
}
return to;
},
writable: true,
configurable: true
});
}
function MakeEnum() {
var x = [];
for (var _i = 0; _i < arguments.length; _i++) {
x[_i] = arguments[_i];
}
return freeze(Object.assign.apply(Object, [{}].concat(x)));
}
exports.MakeEnum = MakeEnum;
});

2

package.json
{
"name": "@gradecam/tsenum",
"version": "1.0.0",
"version": "1.1.0",
"description": "Super simple typescript library for string-compatible enums",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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