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

data-joint

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-joint - npm Package Compare versions

Comparing version 1.2.4 to 1.2.5

2

dist/data-joint.js

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

// Version 1.2.4 data-joint - https://github.com/vasturiano/data-joint
// Version 1.2.5 data-joint - https://github.com/vasturiano/data-joint
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :

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

// Version 1.2.4 data-joint - https://github.com/vasturiano/data-joint
// Version 1.2.5 data-joint - https://github.com/vasturiano/data-joint
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t="undefined"!=typeof globalThis?globalThis:t||self).dataJoint=r()}(this,(function(){"use strict";function t(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function r(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function e(t,r){if(null==t)return{};var e,n,o=function(t,r){if(null==t)return{};var e,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)e=i[n],r.indexOf(e)>=0||(o[e]=t[e]);return o}(t,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)e=i[n],r.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}function n(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==e)return;var n,o,i=[],a=!0,u=!1;try{for(e=e.call(t);!(a=(n=e.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==e.return||e.return()}finally{if(u)throw o}}return i}(t,r)||i(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,r){if(t){if("string"==typeof t)return a(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?a(t,r):void 0}}function a(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function u(t,r){if(null==t)return{};var e,n,o=function(t,r){if(null==t)return{};var e,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)e=i[n],r.indexOf(e)>=0||(o[e]=t[e]);return o}(t,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)e=i[n],r.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}function c(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==e)return;var n,o,i=[],a=!0,u=!1;try{for(e=e.call(t);!(a=(n=e.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==e.return||e.return()}finally{if(u)throw o}}return i}(t,r)||l(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||l(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,r){if(t){if("string"==typeof t)return s(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?s(t,r):void 0}}function s(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function y(t){var r=function(t,r){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof r?r:String(r)}var p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=(r instanceof Array?r.length?r:[void 0]:[r]).map((function(t){return{keyAccessor:t,isProp:!(t instanceof Function)}})),i=t.reduce((function(t,r){var n=t,i=r;return o.forEach((function(t,r){var a,c=t.keyAccessor;if(t.isProp){var f=i,l=f[c],s=u(f,[c].map(y));a=l,i=s}else a=c(i,r);r+1<o.length?(n.hasOwnProperty(a)||(n[a]={}),n=n[a]):e?(n.hasOwnProperty(a)||(n[a]=[]),n[a].push(i)):n[a]=i})),t}),{});e instanceof Function&&function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;n===o.length?Object.keys(r).forEach((function(t){return r[t]=e(r[t])})):Object.values(r).forEach((function(r){return t(r,n+1)}))}(i);var a=i;return n&&(a=[],function t(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.length===o.length?a.push({keys:e,vals:r}):Object.entries(r).forEach((function(r){var n=c(r,2),o=n[0],i=n[1];return t(i,[].concat(f(e),[o]))}))}(i),r instanceof Array&&0===r.length&&1===a.length&&(a[0].keys=[])),a};function d(t,e,i){var a=i.objBindAttr,u=void 0===a?"__obj":a,c=i.dataBindAttr,f=void 0===c?"__data":c,l=i.idAccessor,s=i.purge,y=void 0!==s&&s,d=function(t){return t.hasOwnProperty(f)},b=e.filter((function(t){return!d(t)})),v=e.filter(d).map((function(t){return t[f]})),h=y?{enter:t,exit:v,update:[]}:function(t,r,e){var i={enter:[],update:[],exit:[]};if(e){var a=p(t,e,!1),u=p(r,e,!1),c=Object.assign({},a,u);Object.entries(c).forEach((function(t){var r=n(t,2),e=r[0],o=r[1],c=a.hasOwnProperty(e)?u.hasOwnProperty(e)?"update":"exit":"enter";i[c].push("update"===c?[a[e],u[e]]:o)}))}else{var f=new Set(t),l=new Set(r);new Set([].concat(o(f),o(l))).forEach((function(t){var r=f.has(t)?l.has(t)?"update":"exit":"enter";i[r].push("update"===r?[t,t]:t)}))}return i}(v,t,l);return h.update=h.update.map((function(t){var r=n(t,2),e=r[0],o=r[1];return e!==o&&(o[u]=e[u],o[u][f]=o),o})),h.exit=h.exit.concat(b.map((function(t){return r({},u,t)}))),h}return function(n,i,a,u,c){var f=c.createObj,l=void 0===f?function(t){return{}}:f,s=c.updateObj,y=void 0===s?function(t,r){}:s,p=c.exitObj,b=void 0===p?function(t){}:p,v=c.objBindAttr,h=void 0===v?"__obj":v,m=c.dataBindAttr,O=void 0===m?"__data":m,g=e(c,["createObj","updateObj","exitObj","objBindAttr","dataBindAttr"]),j=d(n,i,function(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}({objBindAttr:h,dataBindAttr:O},g)),w=j.enter,A=j.update;j.exit.forEach((function(t){var r=t[h];delete t[h],b(r),u(r)}));var S=function(t){var r=[];return t.forEach((function(t){var e=l(t);e&&(e[O]=t,t[h]=e,r.push(e))})),r}(w);!function(t){t.forEach((function(t){var r=t[h];r&&(r[O]=t,y(r,t))}))}([].concat(o(w),o(A))),S.forEach(a)}}));
{
"name": "data-joint",
"version": "1.2.4",
"version": "1.2.5",
"description": "Perform data joins with any type of JS objects",

@@ -5,0 +5,0 @@ "unpkg": "dist/data-joint.min.js",

@@ -6,3 +6,3 @@ data-joint

[![Build Size][build-size-img]][build-size-url]
[![Dependencies][dependencies-img]][dependencies-url]
[![NPM Downloads][npm-downloads-img]][npm-downloads-url]

@@ -15,15 +15,15 @@ Library to perform data joins with any type of JavaScript objects.

```
```js
import dataJoint from 'data-joint';
```
or
```
```js
const dataJoint = require('data-joint');
```
or even
```
```html
<script src="//unpkg.com/data-joint"></script>
```
then
```
```js
const myData = [{ id: 0, val: 2 }, { id: 1, val: 4 }, { id: 2, val: 7 }];

@@ -75,7 +75,7 @@ const myView = new Set();

[npm-img]: https://img.shields.io/npm/v/data-joint.svg
[npm-img]: https://img.shields.io/npm/v/data-joint
[npm-url]: https://npmjs.org/package/data-joint
[build-size-img]: https://img.shields.io/bundlephobia/minzip/data-joint.svg
[build-size-img]: https://img.shields.io/bundlephobia/minzip/data-joint
[build-size-url]: https://bundlephobia.com/result?p=data-joint
[dependencies-img]: https://img.shields.io/david/vasturiano/data-joint.svg
[dependencies-url]: https://david-dm.org/vasturiano/data-joint
[npm-downloads-img]: https://img.shields.io/npm/dt/data-joint
[npm-downloads-url]: https://www.npmtrends.com/data-joint
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