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

prelude-extension

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

prelude-extension - npm Package Compare versions

Comparing version 0.0.13 to 0.1.0

27

index.js

@@ -0,4 +1,18 @@

// Generated by LiveScript 1.4.0
(function(){
var ref$, all, any, concatMap, each, filter, find, isType, keys, map, Obj, objToPairs, partition, reverse, sortBy, clamp, findAll, get, isEmptyObject, isEqualToObject, partitionString, mappend, rextend, set, transpose, unwrap, slice$ = [].slice, toString$ = {}.toString;
ref$ = require('prelude-ls'), all = ref$.all, any = ref$.any, concatMap = ref$.concatMap, each = ref$.each, filter = ref$.filter, find = ref$.find, isType = ref$.isType, keys = ref$.keys, map = ref$.map, Obj = ref$.Obj, objToPairs = ref$.objToPairs, partition = ref$.partition, reverse = ref$.reverse, sortBy = ref$.sortBy;
var ref$, all, any, concatMap, each, filter, find, fold, isType, keys, map, Obj, objToPairs, partition, reverse, sortBy, batch, clamp, findAll, get, isEmptyObject, isEqualToObject, partitionString, mappend, rextend, set, transpose, unwrap, slice$ = [].slice, toString$ = {}.toString;
ref$ = require('prelude-ls'), all = ref$.all, any = ref$.any, concatMap = ref$.concatMap, each = ref$.each, filter = ref$.filter, find = ref$.find, fold = ref$.fold, isType = ref$.isType, keys = ref$.keys, map = ref$.map, Obj = ref$.Obj, objToPairs = ref$.objToPairs, partition = ref$.partition, reverse = ref$.reverse, sortBy = ref$.sortBy;
batch = curry$(function(size, items){
return fold(function(acc, item){
var lastBatch;
lastBatch = acc[acc.length - 1];
if (lastBatch.length < size) {
lastBatch.push(item);
return acc;
} else {
return [].concat(acc, [[item]]);
}
}, [[]])(
items);
});
clamp = curry$(function(n, min, max){

@@ -29,5 +43,4 @@ return Math.max(min, Math.min(max, n));

});
isEmptyObject = function(o){
var numberOfKeys;
numberOfKeys = function(it){
isEmptyObject = function(object){
return 0 === function(it){
return it.length;

@@ -39,4 +52,3 @@ }(

})(
o)));
return numberOfKeys === 0;
object)));
};

@@ -179,2 +191,3 @@ isEqualToObject = curry$(function(o1, o2){

module.exports = {
batch: batch,
clamp: clamp,

@@ -181,0 +194,0 @@ findAll: findAll,

{
"name": "prelude-extension",
"version": "0.0.13",
"version": "0.1.0",
"description": "prelude-extension",

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

@@ -11,2 +11,4 @@ Prelude Extension

# Functions
`batch :: Number -> [a] -> [[a]]`
`clamp :: Number -> Number -> Number`

@@ -13,0 +15,0 @@

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