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

@aller/site-id

Package Overview
Dependencies
Maintainers
16
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aller/site-id - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

37

lib/index.js

@@ -6,9 +6,30 @@ 'use strict';

});
exports.hosts = exports.siteIds = exports.getSiteId = exports.getHost = undefined;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var _extends3 = require('babel-runtime/helpers/extends');
var _extends4 = _interopRequireDefault(_extends3);
var _slicedToArray2 = require('babel-runtime/helpers/slicedToArray');
var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
var _entries = require('babel-runtime/core-js/object/entries');
var _entries2 = _interopRequireDefault(_entries);
var _values = require('babel-runtime/core-js/object/values');
var _values2 = _interopRequireDefault(_values);
var _keys = require('babel-runtime/core-js/object/keys');
var _keys2 = _interopRequireDefault(_keys);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var siteIdsObject = {

@@ -32,13 +53,13 @@ '1': 'dagbladet.no',

var siteIds = Object.keys(siteIdsObject).sort();
var hosts = Object.values(siteIdsObject).sort();
var siteIds = (0, _keys2.default)(siteIdsObject).sort();
var hosts = (0, _values2.default)(siteIdsObject).sort();
// Invert object key/values pairs
function invert(data) {
return Object.entries(data).reduce(function (obj, _ref) {
var _ref2 = _slicedToArray(_ref, 2),
return (0, _entries2.default)(data).reduce(function (obj, _ref) {
var _ref2 = (0, _slicedToArray3.default)(_ref, 2),
key = _ref2[0],
value = _ref2[1];
return _extends({}, obj, _defineProperty({}, value, key));
return (0, _extends4.default)({}, obj, (0, _defineProperty3.default)({}, value, key));
}, {});

@@ -45,0 +66,0 @@ }

{
"name": "@aller/site-id",
"version": "1.3.0",
"version": "1.3.1",
"description": "Site ID to host and vice versa",

@@ -29,2 +29,3 @@ "main": "lib/index.js",

"babel-plugin-transform-object-rest-spread": "6.26.0",
"babel-plugin-transform-runtime": "6.23.0",
"babel-preset-env": "1.7.0",

@@ -31,0 +32,0 @@ "babel-register": "6.26.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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