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

alga-js

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alga-js - npm Package Compare versions

Comparing version 0.1.0-wood-7 to 0.1.0-wood-8

ts/array/duplicateArray.ts

62

lib/array/array.cjs.js

@@ -461,2 +461,64 @@ 'use strict';

var duplication = function (fromArray, prop) {
if (prop === void 0) { prop = ''; }
var newArray = [];
var newArrSet = Array.from(new Set(fromArray));
if (prop !== '') {
newArrSet = Array.from(new Set(fromArray.map(function (i) { return i[prop]; })));
}
var _loop_1 = function (setItem) {
var tempArr = Array.from(fromArray).filter(function (filterItem) {
if (prop !== '') {
return filterItem[prop] === setItem;
}
else {
return filterItem === setItem;
}
});
if (Number(tempArr.length) >= 2) {
tempArr.forEach(function (arrItem) {
newArray.push(arrItem);
});
}
};
for (var _i = 0, newArrSet_1 = newArrSet; _i < newArrSet_1.length; _i++) {
var setItem = newArrSet_1[_i];
_loop_1(setItem);
}
return newArray;
};
var duplicationGroup = function (fromArray, prop) {
if (prop === void 0) { prop = ''; }
var newObj = {};
var newSet = new Set();
var newArrSet = Array.from(new Set(fromArray));
if (prop !== '') {
newArrSet = Array.from(new Set(fromArray.map(function (i) { return i[prop]; })));
}
var _loop_2 = function (setItem) {
var tempArr = Array.from(fromArray).filter(function (filterItem) {
if (prop !== '') {
return filterItem[prop] === setItem;
}
else {
return filterItem === setItem;
}
});
if (!newSet.has(tempArr.length)) {
newSet.add(tempArr.length);
newObj[tempArr.length] = [];
}
tempArr.forEach(function (arrItem) {
newObj[tempArr.length].push(arrItem);
});
};
for (var _i = 0, newArrSet_2 = newArrSet; _i < newArrSet_2.length; _i++) {
var setItem = newArrSet_2[_i];
_loop_2(setItem);
}
return newObj;
};
exports.duplication = duplication;
exports.duplicationGroup = duplicationGroup;
exports.filter = filter;

@@ -463,0 +525,0 @@ exports.flatten = flatten;

62

lib/array/array.es.js

@@ -457,2 +457,62 @@ var uniq = function (fromArray, byProp) {

export { filter, flatten, flattenAsync, nested, nestedAsync, order, pageInfo, pages, paginate, pagination, search, searchBy, sort, sortBy, take, uniq };
var duplication = function (fromArray, prop) {
if (prop === void 0) { prop = ''; }
var newArray = [];
var newArrSet = Array.from(new Set(fromArray));
if (prop !== '') {
newArrSet = Array.from(new Set(fromArray.map(function (i) { return i[prop]; })));
}
var _loop_1 = function (setItem) {
var tempArr = Array.from(fromArray).filter(function (filterItem) {
if (prop !== '') {
return filterItem[prop] === setItem;
}
else {
return filterItem === setItem;
}
});
if (Number(tempArr.length) >= 2) {
tempArr.forEach(function (arrItem) {
newArray.push(arrItem);
});
}
};
for (var _i = 0, newArrSet_1 = newArrSet; _i < newArrSet_1.length; _i++) {
var setItem = newArrSet_1[_i];
_loop_1(setItem);
}
return newArray;
};
var duplicationGroup = function (fromArray, prop) {
if (prop === void 0) { prop = ''; }
var newObj = {};
var newSet = new Set();
var newArrSet = Array.from(new Set(fromArray));
if (prop !== '') {
newArrSet = Array.from(new Set(fromArray.map(function (i) { return i[prop]; })));
}
var _loop_2 = function (setItem) {
var tempArr = Array.from(fromArray).filter(function (filterItem) {
if (prop !== '') {
return filterItem[prop] === setItem;
}
else {
return filterItem === setItem;
}
});
if (!newSet.has(tempArr.length)) {
newSet.add(tempArr.length);
newObj[tempArr.length] = [];
}
tempArr.forEach(function (arrItem) {
newObj[tempArr.length].push(arrItem);
});
};
for (var _i = 0, newArrSet_2 = newArrSet; _i < newArrSet_2.length; _i++) {
var setItem = newArrSet_2[_i];
_loop_2(setItem);
}
return newObj;
};
export { duplication, duplicationGroup, filter, flatten, flattenAsync, nested, nestedAsync, order, pageInfo, pages, paginate, pagination, search, searchBy, sort, sortBy, take, uniq };

2

lib/array/array.js

@@ -16,2 +16,2 @@ var array=function(r){"use strict";var e=function(r,e){void 0===e&&(e="");for(var n=[],t=Number(e),i=new Set,o=0,u=r;o<u.length;o++){var a=u[o];if("object"==typeof a&&null!==a&&"string"==typeof e&&""!==e&&!1===Array.isArray(a))i.has(a[e])||(n.push(a),i.add(a[e]));else if(Array.isArray(a)&&!1===isNaN(t)&&Number(a.length)>Number(e)){var f=Number(e);i.has(a[f])||(n.push(a),i.add(a[f]))}else i.has(JSON.stringify(a))||(n.push(a),i.add(JSON.stringify(a)))}return n};

***************************************************************************** */
function n(r,e,n,t){return new(n||(n=Promise))((function(i,o){function u(r){try{f(t.next(r))}catch(r){o(r)}}function a(r){try{f(t.throw(r))}catch(r){o(r)}}function f(r){var e;r.done?i(r.value):(e=r.value,e instanceof n?e:new n((function(r){r(e)}))).then(u,a)}f((t=t.apply(r,e||[])).next())}))}function t(r,e){var n,t,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,t&&(i=2&o[0]?t.return:o[0]?t.throw||((i=t.return)&&i.call(t),0):t.next)&&!(i=i.call(t,o[1])).done)return i;switch(t=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,t=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=e.call(r,u)}catch(r){o=[6,r],t=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function i(r,e,n){if(n||2===arguments.length)for(var t,i=0,o=e.length;i<o;i++)!t&&i in e||(t||(t=Array.prototype.slice.call(e,0,i)),t[i]=e[i]);return r.concat(t||Array.prototype.slice.call(e))}var o=function(r,e){void 0===e&&(e={prop:"id",parent:"parent",children:"children"});var n,t=Array.from(r),i=e,o=function(r){var e=r;return void 0!==r[i.children]&&null!==r[i.children]||(e[i.children]=u(r[i.prop]),e[i.children].length<=0&&delete e[i.children]),delete e[i.parent],e},u=function(r){var e=[];return a(r).length>=1&&a(r).forEach((function(r){e.push(o(r))})),e},a=function(r){return t.filter((function(e){return e[i.parent]===r}))};return(n=t).filter((function(r){return"object"==typeof r&&null!==r&&!n.map((function(r){return String(r[i.prop]).trim()})).includes(String(r[i.parent]).trim())})).map((function(r){return o(r)}))},u=function(r,e){void 0===e&&(e={prop:"id",parent:"parent",children:"children"});var n=[],t=e,i=function(r,e){r.length>=1&&Array.from(r).forEach((function(r){if("object"==typeof r&&null!==r){var o=r;o[t.parent]=e[t.prop],"object"==typeof o[t.children]&&Array.isArray(o[t.children])&&(i(o[t.children],r),delete o[t.children]),n.push(o)}}))};return Array.from(r).forEach((function(r){if("object"==typeof r&&null!==r){var e=r;e[t.parent]="0","object"==typeof e[t.children]&&Array.isArray(e[t.children])&&(i(e[t.children],r),delete e[t.children]),n.push(e)}})),n},a=function(r,e,n){void 0===n&&(n="asc");var t=Array.from(r);return"asc"===n?t.sort((function(r,n){if(e in r&&e in n){if(!1===isNaN(r[e])&&!1===isNaN(n[e]))return Number(r[e])-Number(n[e]);if("string"==typeof r[e]&&"string"==typeof n[e]){var t=r[e].toLowerCase(),i=n[e].toLowerCase(),o=0;return t<i?o=-1:t>i&&(o=1),o}}})):"desc"===n&&t.sort((function(r,n){if(e in r&&e in n){if(!1===isNaN(r[e])&&!1===isNaN(n[e]))return Number(n[e])-Number(r[e]);if("string"==typeof r[e]&&"string"==typeof n[e]){var t=r[e].toLowerCase(),i=n[e].toLowerCase(),o=0;return i<t?o=-1:i>t&&(o=1),o}}})),t},f=a;return r.filter=function(r,e){for(var n=Array.from(r),t=function(r){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var t={},i=new Set(e),o=0,u=Object.keys(r);o<u.length;o++){var a=u[o];i.has(r[a])||(t[a]=r[a])}return t}(e,"",0),i=function(r){var e=n.filter((function(e){if(r in e){if(!1===isNaN(e[r])&&Number(e[r])===Number(t[r]))return!0;if("string"==typeof e[r]&&String(e[r]).toLowerCase().includes(String(t[r]).toLowerCase()))return!0}return!1}));n=e},o=0,u=Object.keys(t);o<u.length;o++){i(u[o])}return n},r.flatten=u,r.flattenAsync=function(r,e){return void 0===e&&(e={}),n(void 0,void 0,void 0,(function(){var n;return t(this,(function(t){switch(t.label){case 0:return[4,Promise.resolve(r)];case 1:return n=t.sent(),[2,Promise.resolve(u(n,e))]}}))}))},r.nested=o,r.nestedAsync=function(r,e){return void 0===e&&(e={}),n(void 0,void 0,void 0,(function(){var n;return t(this,(function(t){switch(t.label){case 0:return[4,Promise.resolve(r)];case 1:return n=t.sent(),[2,Promise.resolve(o(n,e))]}}))}))},r.order=function(r,e){return void 0===e&&(e="order"),Array.from(r).map((function(r,n){return"object"==typeof r&&null!==r&&(r[e]=Number(n)+1),r}))},r.pageInfo=function(r,e,n){void 0===e&&(e=1),void 0===n&&(n=10);var t=Array.from(r),i=Number(n)*Number(e)-(Number(n)-1),o=Number(n)*Number(e);return{from:t.length>=1?i:0,start:t.length>=1?i:0,to:o<=t.length?o:t.length,end:o<=t.length?o:t.length,of:t.length,length:t.length}},r.pages=function(r,e){void 0===e&&(e=10);var n=Array.isArray(r)?r.length:r,t=Number(n)/Number(e);return Math.ceil(t)},r.paginate=function(r,e,n){void 0===e&&(e=1),void 0===n&&(n=10);var t=Array.from(r),i=Number(n)*Number(e)-(Number(n)-1),o=Number(n)*Number(e);return t.slice(i-1,o<=t.length?o:t.length)},r.pagination=function(r,e,n){void 0===e&&(e=1),void 0===n&&(n=0);var t=[],i=Number(r)<Number(e)?Number(r):Number(e),o=Number(e)<1?1:Number(e),u=i+Number(n),a=o-Number(n);if(0===Number(n))for(var f=1;f<=Number(r);f++)t.push(String(f));else{if(o>1)for(f=a;f<o;f++)t.push(String(f));for(f=i;f<=u;f++)t.push(String(f))}var c=t.filter((function(r){return Number(r)>0})).filter((function(e){return Number(e)<=Number(r)}));return u<Number(r)&&0!==Number(n)&&c.push("..."),a>1&&0!==Number(n)&&c.unshift("..."),c},r.search=function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];for(var o=[],u=function(n){var t=Array.from(r).filter((function(r){if(!1===isNaN(r)&&Number(r)===Number(n))return!0;if("string"==typeof r&&String(r).toLowerCase().includes(String(n).toLowerCase()))return!0;if("object"==typeof r&&null!==r)for(var e=0,t=Object.keys(r);e<t.length;e++){var i=t[e];if(!1===isNaN(r[i])&&Number(r[i])===Number(n))return!0;if("string"==typeof r[i]&&String(r[i]).toLowerCase().includes(String(n).toLowerCase()))return!0}return!1}));o=e(i(i([],o,!0),t,!0))},a=0,f=n.flat();a<f.length;a++){var c=f[a];u(c)}return o},r.searchBy=function(r,n,t){for(var o=[],u=function(n){var u=Array.from(r).filter((function(r){for(var e=0,i=Array.from(t);e<i.length;e++){var o=i[e];if(o in r){if(!1===isNaN(r[o])&&Number(r[o])===Number(n))return!0;if("string"==typeof r[o]&&-1!==String(r[o]).toLowerCase().indexOf(String(n).toLowerCase()))return!0}}return!1}));o=e(i(i([],o,!0),u,!0))},a=0,f=n;a<f.length;a++){u(f[a])}return o},r.sort=f,r.sortBy=a,r.take=function(r,e,n){void 0===n&&(n="");var t=[],i=Number(e);return Array.isArray(r)&&r.length>=1&&("object"==typeof r[0]&&null!==r[0]&&"string"==typeof e&&Object.keys(r[0]).includes(e)?(t=r.map((function(r){return r[e]})),"uniq"===n&&(t=Array.from(new Set(t)))):Array.isArray(r[0])&&!1===isNaN(i)?(t=r.map((function(r){return r[i]})),"uniq"===n&&(t=Array.from(new Set(t)))):"function"==typeof e&&(t=r.filter((function(r){return e(r)})),""!==n&&(t=t.map((function(r){return r[n]}))))),t},r.uniq=e,Object.defineProperty(r,"__esModule",{value:!0}),r}({});
function n(r,e,n,t){return new(n||(n=Promise))((function(i,o){function u(r){try{f(t.next(r))}catch(r){o(r)}}function a(r){try{f(t.throw(r))}catch(r){o(r)}}function f(r){var e;r.done?i(r.value):(e=r.value,e instanceof n?e:new n((function(r){r(e)}))).then(u,a)}f((t=t.apply(r,e||[])).next())}))}function t(r,e){var n,t,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,t&&(i=2&o[0]?t.return:o[0]?t.throw||((i=t.return)&&i.call(t),0):t.next)&&!(i=i.call(t,o[1])).done)return i;switch(t=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,t=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=e.call(r,u)}catch(r){o=[6,r],t=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function i(r,e,n){if(n||2===arguments.length)for(var t,i=0,o=e.length;i<o;i++)!t&&i in e||(t||(t=Array.prototype.slice.call(e,0,i)),t[i]=e[i]);return r.concat(t||Array.prototype.slice.call(e))}var o=function(r,e){void 0===e&&(e={prop:"id",parent:"parent",children:"children"});var n,t=Array.from(r),i=e,o=function(r){var e=r;return void 0!==r[i.children]&&null!==r[i.children]||(e[i.children]=u(r[i.prop]),e[i.children].length<=0&&delete e[i.children]),delete e[i.parent],e},u=function(r){var e=[];return a(r).length>=1&&a(r).forEach((function(r){e.push(o(r))})),e},a=function(r){return t.filter((function(e){return e[i.parent]===r}))};return(n=t).filter((function(r){return"object"==typeof r&&null!==r&&!n.map((function(r){return String(r[i.prop]).trim()})).includes(String(r[i.parent]).trim())})).map((function(r){return o(r)}))},u=function(r,e){void 0===e&&(e={prop:"id",parent:"parent",children:"children"});var n=[],t=e,i=function(r,e){r.length>=1&&Array.from(r).forEach((function(r){if("object"==typeof r&&null!==r){var o=r;o[t.parent]=e[t.prop],"object"==typeof o[t.children]&&Array.isArray(o[t.children])&&(i(o[t.children],r),delete o[t.children]),n.push(o)}}))};return Array.from(r).forEach((function(r){if("object"==typeof r&&null!==r){var e=r;e[t.parent]="0","object"==typeof e[t.children]&&Array.isArray(e[t.children])&&(i(e[t.children],r),delete e[t.children]),n.push(e)}})),n},a=function(r,e,n){void 0===n&&(n="asc");var t=Array.from(r);return"asc"===n?t.sort((function(r,n){if(e in r&&e in n){if(!1===isNaN(r[e])&&!1===isNaN(n[e]))return Number(r[e])-Number(n[e]);if("string"==typeof r[e]&&"string"==typeof n[e]){var t=r[e].toLowerCase(),i=n[e].toLowerCase(),o=0;return t<i?o=-1:t>i&&(o=1),o}}})):"desc"===n&&t.sort((function(r,n){if(e in r&&e in n){if(!1===isNaN(r[e])&&!1===isNaN(n[e]))return Number(n[e])-Number(r[e]);if("string"==typeof r[e]&&"string"==typeof n[e]){var t=r[e].toLowerCase(),i=n[e].toLowerCase(),o=0;return i<t?o=-1:i>t&&(o=1),o}}})),t},f=a;return r.duplication=function(r,e){void 0===e&&(e="");var n=[],t=Array.from(new Set(r));""!==e&&(t=Array.from(new Set(r.map((function(r){return r[e]})))));for(var i=function(t){var i=Array.from(r).filter((function(r){return""!==e?r[e]===t:r===t}));Number(i.length)>=2&&i.forEach((function(r){n.push(r)}))},o=0,u=t;o<u.length;o++){i(u[o])}return n},r.duplicationGroup=function(r,e){void 0===e&&(e="");var n={},t=new Set,i=Array.from(new Set(r));""!==e&&(i=Array.from(new Set(r.map((function(r){return r[e]})))));for(var o=function(i){var o=Array.from(r).filter((function(r){return""!==e?r[e]===i:r===i}));t.has(o.length)||(t.add(o.length),n[o.length]=[]),o.forEach((function(r){n[o.length].push(r)}))},u=0,a=i;u<a.length;u++){o(a[u])}return n},r.filter=function(r,e){for(var n=Array.from(r),t=function(r){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var t={},i=new Set(e),o=0,u=Object.keys(r);o<u.length;o++){var a=u[o];i.has(r[a])||(t[a]=r[a])}return t}(e,"",0),i=function(r){var e=n.filter((function(e){if(r in e){if(!1===isNaN(e[r])&&Number(e[r])===Number(t[r]))return!0;if("string"==typeof e[r]&&String(e[r]).toLowerCase().includes(String(t[r]).toLowerCase()))return!0}return!1}));n=e},o=0,u=Object.keys(t);o<u.length;o++){i(u[o])}return n},r.flatten=u,r.flattenAsync=function(r,e){return void 0===e&&(e={}),n(void 0,void 0,void 0,(function(){var n;return t(this,(function(t){switch(t.label){case 0:return[4,Promise.resolve(r)];case 1:return n=t.sent(),[2,Promise.resolve(u(n,e))]}}))}))},r.nested=o,r.nestedAsync=function(r,e){return void 0===e&&(e={}),n(void 0,void 0,void 0,(function(){var n;return t(this,(function(t){switch(t.label){case 0:return[4,Promise.resolve(r)];case 1:return n=t.sent(),[2,Promise.resolve(o(n,e))]}}))}))},r.order=function(r,e){return void 0===e&&(e="order"),Array.from(r).map((function(r,n){return"object"==typeof r&&null!==r&&(r[e]=Number(n)+1),r}))},r.pageInfo=function(r,e,n){void 0===e&&(e=1),void 0===n&&(n=10);var t=Array.from(r),i=Number(n)*Number(e)-(Number(n)-1),o=Number(n)*Number(e);return{from:t.length>=1?i:0,start:t.length>=1?i:0,to:o<=t.length?o:t.length,end:o<=t.length?o:t.length,of:t.length,length:t.length}},r.pages=function(r,e){void 0===e&&(e=10);var n=Array.isArray(r)?r.length:r,t=Number(n)/Number(e);return Math.ceil(t)},r.paginate=function(r,e,n){void 0===e&&(e=1),void 0===n&&(n=10);var t=Array.from(r),i=Number(n)*Number(e)-(Number(n)-1),o=Number(n)*Number(e);return t.slice(i-1,o<=t.length?o:t.length)},r.pagination=function(r,e,n){void 0===e&&(e=1),void 0===n&&(n=0);var t=[],i=Number(r)<Number(e)?Number(r):Number(e),o=Number(e)<1?1:Number(e),u=i+Number(n),a=o-Number(n);if(0===Number(n))for(var f=1;f<=Number(r);f++)t.push(String(f));else{if(o>1)for(f=a;f<o;f++)t.push(String(f));for(f=i;f<=u;f++)t.push(String(f))}var c=t.filter((function(r){return Number(r)>0})).filter((function(e){return Number(e)<=Number(r)}));return u<Number(r)&&0!==Number(n)&&c.push("..."),a>1&&0!==Number(n)&&c.unshift("..."),c},r.search=function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];for(var o=[],u=function(n){var t=Array.from(r).filter((function(r){if(!1===isNaN(r)&&Number(r)===Number(n))return!0;if("string"==typeof r&&String(r).toLowerCase().includes(String(n).toLowerCase()))return!0;if("object"==typeof r&&null!==r)for(var e=0,t=Object.keys(r);e<t.length;e++){var i=t[e];if(!1===isNaN(r[i])&&Number(r[i])===Number(n))return!0;if("string"==typeof r[i]&&String(r[i]).toLowerCase().includes(String(n).toLowerCase()))return!0}return!1}));o=e(i(i([],o,!0),t,!0))},a=0,f=n.flat();a<f.length;a++){var c=f[a];u(c)}return o},r.searchBy=function(r,n,t){for(var o=[],u=function(n){var u=Array.from(r).filter((function(r){for(var e=0,i=Array.from(t);e<i.length;e++){var o=i[e];if(o in r){if(!1===isNaN(r[o])&&Number(r[o])===Number(n))return!0;if("string"==typeof r[o]&&-1!==String(r[o]).toLowerCase().indexOf(String(n).toLowerCase()))return!0}}return!1}));o=e(i(i([],o,!0),u,!0))},a=0,f=n;a<f.length;a++){u(f[a])}return o},r.sort=f,r.sortBy=a,r.take=function(r,e,n){void 0===n&&(n="");var t=[],i=Number(e);return Array.isArray(r)&&r.length>=1&&("object"==typeof r[0]&&null!==r[0]&&"string"==typeof e&&Object.keys(r[0]).includes(e)?(t=r.map((function(r){return r[e]})),"uniq"===n&&(t=Array.from(new Set(t)))):Array.isArray(r[0])&&!1===isNaN(i)?(t=r.map((function(r){return r[i]})),"uniq"===n&&(t=Array.from(new Set(t)))):"function"==typeof e&&(t=r.filter((function(r){return e(r)})),""!==n&&(t=t.map((function(r){return r[n]}))))),t},r.uniq=e,Object.defineProperty(r,"__esModule",{value:!0}),r}({});
{
"name": "alga-js",
"version": "0.1.0-wood-7",
"version": "0.1.0-wood-8",
"description": "Alga.js is a JavaScript helper to help build UI components by using any of modern web frameworks or libraries",

@@ -5,0 +5,0 @@ "module": "dist/alga.min.js",

@@ -9,1 +9,2 @@ export * from './uniqArray.js'

export * from './paginateArray.js'
export * from './duplicateArray.js'

@@ -9,1 +9,2 @@ export * from './uniqArray.js';

export * from './paginateArray.js';
export * from './duplicateArray.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