Socket
Socket
Sign inDemoInstall

js-awe

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-awe - npm Package Compare versions

Comparing version 1.0.64 to 1.0.65

37

dist/browser/js-awe.min.d.ts

@@ -370,3 +370,3 @@ import * as F from 'fluture';

};
declare function runEvery(period: any): {
declare function oneIn(period: any): {
calls: (runFunc: any) => {

@@ -501,9 +501,34 @@ (...args: any[]): any;

* Add input rows which hash is not present in the target
* duplicates in the target will be deleted keeping the last row.
* @param isAsc undefined: does not order. true: return result in asc order. false: in desc order
* @param hashAddNoDups hash function for the input data
* @param addNoDupsToTheEnd input data
* @param hashMaster hash function for the target data
* @param master target data
*/
declare const unionWithHashKeys: any;
declare function unionWithHashKeysUnc<T,P>(
isAsc: boolean|undefined,
hashAddNoDups: (elem: T) => string,
addNoDupsToTheEnd: T[],
hashMaster: (elem: P) => string,
master: P[]
): (T|P)[];
/**
* Update target with input for rows with same hash
* Add to target the new rows from input with new hash.
* Add input rows which hash is not present in the target
* duplicates in the target will be deleted keeping the last row.
* @param isAsc undefined: does not order. true: return result in asc order. false: in desc order
* @param hashAddNoDups hash function for the input data
* @param addNoDupsToTheEnd input data
* @param hashMaster hash function for the target data
* @return a function ready to receive the target data
*/
declare const updateWithHashKeys: any;
declare function unionWithHashKeys<T,P>(
isAsc: boolean|undefined,
hashAddNoDups: (elem: T) => string,
addNoDupsToTheEnd: T[],
hashMaster: (elem: T) => string,
):(master: P[]) => (T|P)[];
declare const between: any;

@@ -672,2 +697,2 @@ declare const matchByPropId: any;

export { Chrono, CustomError, Enum, EnumMap, RE, RLog, Table, Text, Timeline, YYYY_MM_DD_hh_mm_ss_ToUtcDate, addDays, anonymize, arrayOfObjectsToObject, arraySorter, arrayToObject, bearerSanitizer, between, cleanString, cloneCopy, colorByStatus, colorMessage, colorMessageByStatus, colors, copyPropsWithValue, copyPropsWithValueUsingRules, createCustomErrorClass, dateFormatter, dateToObj, deepFreeze, diffInDaysYYYY_MM_DD, exclude, fetchImproved, ffletchMaker, fillWith, filterFlatMap, filterMap, findDeepKey, findSolution, firstCapital, fletch, formatDate, getAt, getSameDateOrPreviousFridayForWeekends, groupByWithCalc, indexOfNthMatch, innerRightJoinWith, isDate, isDateMidnight, isEmpty, isPromise, isStringADate, lengthSanitizer, log, logWithPrefix, loopIndexGenerator, mapWithNext, mapWithPrevious, matchByPropId, memoize, mergeArrayOfObjectsRenamingProps, notTo, parallel, partialAtPos, pickPaths, pipe, pipeWhile, pipeWithChain, plan, previousDayOfWeek, processExit, project, promiseAll, promiseFunToFutureFun, pushAt, pushUniqueKey, pushUniqueKeyOrChange, queryObjToStr, removeDuplicates, repeat, replaceAll, retryWithSleep, runEvery, runFunctionsSyncOrParallel, runFutureFunctionsInParallel, sanitize, setAt, setDateToMidnight, sleep, sleepWithFunction, sleepWithValue, something, sorterByPaths, splitCond, subtractDays, transition, traverse, traverseVertically, uncurry, unionWithHashKeys, updateWithHashKeys, urlCompose, urlDecompose, varSubsDoubleBracket, wildcardToRegExp };
export { Chrono, CustomError, Enum, EnumMap, RE, RLog, Table, Text, Timeline, YYYY_MM_DD_hh_mm_ss_ToUtcDate, addDays, anonymize, arrayOfObjectsToObject, arraySorter, arrayToObject, bearerSanitizer, between, cleanString, cloneCopy, colorByStatus, colorMessage, colorMessageByStatus, colors, copyPropsWithValue, copyPropsWithValueUsingRules, createCustomErrorClass, dateFormatter, dateToObj, deepFreeze, diffInDaysYYYY_MM_DD, exclude, fetchImproved, ffletchMaker, fillWith, filterFlatMap, filterMap, findDeepKey, findSolution, firstCapital, fletch, formatDate, getAt, getSameDateOrPreviousFridayForWeekends, groupByWithCalc, indexOfNthMatch, innerRightJoinWith, isDate, isDateMidnight, isEmpty, isPromise, isStringADate, lengthSanitizer, log, logWithPrefix, loopIndexGenerator, mapWithNext, mapWithPrevious, matchByPropId, memoize, mergeArrayOfObjectsRenamingProps, notTo, oneIn, parallel, partialAtPos, pickPaths, pipe, pipeWhile, pipeWithChain, plan, previousDayOfWeek, processExit, project, promiseAll, promiseFunToFutureFun, pushAt, pushUniqueKey, pushUniqueKeyOrChange, queryObjToStr, removeDuplicates, repeat, replaceAll, retryWithSleep, runFunctionsSyncOrParallel, runFutureFunctionsInParallel, sanitize, setAt, setDateToMidnight, sleep, sleepWithFunction, sleepWithValue, something, sorterByPaths, splitCond, subtractDays, transition, traverse, traverseVertically, uncurry, unionWithHashKeys, unionWithHashKeysUnc, urlCompose, urlDecompose, varSubsDoubleBracket, wildcardToRegExp };

20

dist/cjs/jsUtils.js

@@ -16,3 +16,3 @@ 'use strict';

exports.subtractDays = exports.diffInDaysYYYY_MM_DD = exports.dateToObj = exports.YYYY_MM_DD_hh_mm_ss_ToUtcDate = exports.dateFormatter = exports.formatDate = exports.isStringADate = exports.isEmpty = exports.isDate = exports.fillWith = exports.memoize = exports.pushAt = exports.pushUniqueKeyOrChange = exports.pushUniqueKey = exports.transition = exports.Enum = exports.EnumMap = exports.copyPropsWithValueUsingRules = exports.copyPropsWithValue = exports.project = exports.traverseVertically = exports.traverse = exports.removeDuplicates = exports.arrayOfObjectsToObject = exports.arrayToObject = exports.notTo = exports.sleepWithFunction = exports.sleepWithValue = exports.sleep = exports.isPromise = exports.arraySorter = exports.filterFlatMap = exports.sorterByPaths = exports.setAt = exports.getAt = exports.deepFreeze = exports.findDeepKey = exports.colorByStatus = exports.colorMessageByStatus = exports.colorMessage = exports.colors = exports.indexOfNthMatch = exports.urlDecompose = exports.urlCompose = exports.createCustomErrorClass = exports.CustomError = exports.queryObjToStr = exports.varSubsDoubleBracket = exports.firstCapital = exports.logWithPrefix = void 0;
exports.processExit = exports.retryWithSleep = exports.loopIndexGenerator = exports.runEvery = exports.repeat = exports.cleanString = exports.replaceAll = exports.setDateToMidnight = exports.isDateMidnight = exports.getSameDateOrPreviousFridayForWeekends = exports.previousDayOfWeek = exports.addDays = void 0;
exports.processExit = exports.retryWithSleep = exports.loopIndexGenerator = exports.oneIn = exports.repeat = exports.cleanString = exports.replaceAll = exports.setDateToMidnight = exports.isDateMidnight = exports.getSameDateOrPreviousFridayForWeekends = exports.previousDayOfWeek = exports.addDays = void 0;
const just_clone_1 = __importDefault(require("just-clone"));

@@ -1496,11 +1496,11 @@ const jsonpath_plus_1 = require("jsonpath-plus");

// repeat(8).value(0) //?
function runEvery(period) {
function oneIn(period) {
let count = 0;
function calls(runFunc) {
function call(runFunc) {
function toExecute(...args) {
count++;
if (count === period) {
count = 0;
if (count === 0) {
count = period - 1;
return runFunc(...args);
}
count--;
}

@@ -1510,6 +1510,6 @@ toExecute.reset = () => count = 0;

}
return { calls };
return { call };
}
exports.runEvery = runEvery;
// let myRunEvery = runEvery(3).calls((txt1, txt2, txt3)=>{console.log(txt1, txt2, txt3);return 3})
exports.oneIn = oneIn;
// let myRunEvery = oneIn(3).call((txt1, txt2, txt3)=>{console.log(txt1, txt2, txt3);return 3})
// myRunEvery('jose','is great', '...') //?

@@ -1606,3 +1606,3 @@ // myRunEvery('jose','is great', '...') //?

repeat,
runEvery,
oneIn,
loopIndexGenerator,

@@ -1609,0 +1609,0 @@ retryWithSleep,

@@ -370,3 +370,3 @@ import * as F from 'fluture';

};
declare function runEvery(period: any): {
declare function oneIn(period: any): {
calls: (runFunc: any) => {

@@ -501,9 +501,34 @@ (...args: any[]): any;

* Add input rows which hash is not present in the target
* duplicates in the target will be deleted keeping the last row.
* @param isAsc undefined: does not order. true: return result in asc order. false: in desc order
* @param hashAddNoDups hash function for the input data
* @param addNoDupsToTheEnd input data
* @param hashMaster hash function for the target data
* @param master target data
*/
declare const unionWithHashKeys: any;
declare function unionWithHashKeysUnc<T,P>(
isAsc: boolean|undefined,
hashAddNoDups: (elem: T) => string,
addNoDupsToTheEnd: T[],
hashMaster: (elem: P) => string,
master: P[]
): (T|P)[];
/**
* Update target with input for rows with same hash
* Add to target the new rows from input with new hash.
* Add input rows which hash is not present in the target
* duplicates in the target will be deleted keeping the last row.
* @param isAsc undefined: does not order. true: return result in asc order. false: in desc order
* @param hashAddNoDups hash function for the input data
* @param addNoDupsToTheEnd input data
* @param hashMaster hash function for the target data
* @return a function ready to receive the target data
*/
declare const updateWithHashKeys: any;
declare function unionWithHashKeys<T,P>(
isAsc: boolean|undefined,
hashAddNoDups: (elem: T) => string,
addNoDupsToTheEnd: T[],
hashMaster: (elem: T) => string,
):(master: P[]) => (T|P)[];
declare const between: any;

@@ -672,2 +697,2 @@ declare const matchByPropId: any;

export { Chrono, CustomError, Enum, EnumMap, RE, RLog, Table, Text, Timeline, YYYY_MM_DD_hh_mm_ss_ToUtcDate, addDays, anonymize, arrayOfObjectsToObject, arraySorter, arrayToObject, bearerSanitizer, between, cleanString, cloneCopy, colorByStatus, colorMessage, colorMessageByStatus, colors, copyPropsWithValue, copyPropsWithValueUsingRules, createCustomErrorClass, dateFormatter, dateToObj, deepFreeze, diffInDaysYYYY_MM_DD, exclude, fetchImproved, ffletchMaker, fillWith, filterFlatMap, filterMap, findDeepKey, findSolution, firstCapital, fletch, formatDate, getAt, getSameDateOrPreviousFridayForWeekends, groupByWithCalc, indexOfNthMatch, innerRightJoinWith, isDate, isDateMidnight, isEmpty, isPromise, isStringADate, lengthSanitizer, log, logWithPrefix, loopIndexGenerator, mapWithNext, mapWithPrevious, matchByPropId, memoize, mergeArrayOfObjectsRenamingProps, notTo, parallel, partialAtPos, pickPaths, pipe, pipeWhile, pipeWithChain, plan, previousDayOfWeek, processExit, project, promiseAll, promiseFunToFutureFun, pushAt, pushUniqueKey, pushUniqueKeyOrChange, queryObjToStr, removeDuplicates, repeat, replaceAll, retryWithSleep, runEvery, runFunctionsSyncOrParallel, runFutureFunctionsInParallel, sanitize, setAt, setDateToMidnight, sleep, sleepWithFunction, sleepWithValue, something, sorterByPaths, splitCond, subtractDays, transition, traverse, traverseVertically, uncurry, unionWithHashKeys, updateWithHashKeys, urlCompose, urlDecompose, varSubsDoubleBracket, wildcardToRegExp };
export { Chrono, CustomError, Enum, EnumMap, RE, RLog, Table, Text, Timeline, YYYY_MM_DD_hh_mm_ss_ToUtcDate, addDays, anonymize, arrayOfObjectsToObject, arraySorter, arrayToObject, bearerSanitizer, between, cleanString, cloneCopy, colorByStatus, colorMessage, colorMessageByStatus, colors, copyPropsWithValue, copyPropsWithValueUsingRules, createCustomErrorClass, dateFormatter, dateToObj, deepFreeze, diffInDaysYYYY_MM_DD, exclude, fetchImproved, ffletchMaker, fillWith, filterFlatMap, filterMap, findDeepKey, findSolution, firstCapital, fletch, formatDate, getAt, getSameDateOrPreviousFridayForWeekends, groupByWithCalc, indexOfNthMatch, innerRightJoinWith, isDate, isDateMidnight, isEmpty, isPromise, isStringADate, lengthSanitizer, log, logWithPrefix, loopIndexGenerator, mapWithNext, mapWithPrevious, matchByPropId, memoize, mergeArrayOfObjectsRenamingProps, notTo, oneIn, parallel, partialAtPos, pickPaths, pipe, pipeWhile, pipeWithChain, plan, previousDayOfWeek, processExit, project, promiseAll, promiseFunToFutureFun, pushAt, pushUniqueKey, pushUniqueKeyOrChange, queryObjToStr, removeDuplicates, repeat, replaceAll, retryWithSleep, runFunctionsSyncOrParallel, runFutureFunctionsInParallel, sanitize, setAt, setDateToMidnight, sleep, sleepWithFunction, sleepWithValue, something, sorterByPaths, splitCond, subtractDays, transition, traverse, traverseVertically, uncurry, unionWithHashKeys, unionWithHashKeysUnc, urlCompose, urlDecompose, varSubsDoubleBracket, wildcardToRegExp };

@@ -1414,11 +1414,11 @@ 'use strict';

// repeat(8).value(0) //?
function runEvery(period) {
function oneIn(period) {
let count = 0;
function calls(runFunc) {
function call(runFunc) {
function toExecute(...args) {
count++;
if (count === period) {
count = 0;
if (count === 0) {
count = period - 1;
return runFunc(...args);
}
count--;
}

@@ -1428,5 +1428,5 @@ toExecute.reset = () => count = 0;

}
return { calls };
return { call };
}
// let myRunEvery = runEvery(3).calls((txt1, txt2, txt3)=>{console.log(txt1, txt2, txt3);return 3})
// let myRunEvery = oneIn(3).call((txt1, txt2, txt3)=>{console.log(txt1, txt2, txt3);return 3})
// myRunEvery('jose','is great', '...') //?

@@ -1521,3 +1521,3 @@ // myRunEvery('jose','is great', '...') //?

repeat,
runEvery,
oneIn,
loopIndexGenerator,

@@ -1528,2 +1528,2 @@ retryWithSleep,

export default jsUtils;
export { logWithPrefix, firstCapital, varSubsDoubleBracket, queryObjToStr, CustomError, createCustomErrorClass, urlCompose, urlDecompose, indexOfNthMatch, colors, colorMessage, colorMessageByStatus, colorByStatus, findDeepKey, deepFreeze, getAt, setAt, sorterByPaths, filterFlatMap, arraySorter, isPromise, sleep, sleepWithValue, sleepWithFunction, notTo, arrayToObject, arrayOfObjectsToObject, removeDuplicates, traverse, traverseVertically, project, copyPropsWithValue, copyPropsWithValueUsingRules, EnumMap, Enum, transition, pushUniqueKey, pushUniqueKeyOrChange, pushAt, memoize, fillWith, isDate, isEmpty, isStringADate, formatDate, dateFormatter, YYYY_MM_DD_hh_mm_ss_ToUtcDate, dateToObj, diffInDaysYYYY_MM_DD, subtractDays, addDays, previousDayOfWeek, getSameDateOrPreviousFridayForWeekends, isDateMidnight, setDateToMidnight, replaceAll, cleanString, repeat, runEvery, loopIndexGenerator, retryWithSleep, processExit };
export { logWithPrefix, firstCapital, varSubsDoubleBracket, queryObjToStr, CustomError, createCustomErrorClass, urlCompose, urlDecompose, indexOfNthMatch, colors, colorMessage, colorMessageByStatus, colorByStatus, findDeepKey, deepFreeze, getAt, setAt, sorterByPaths, filterFlatMap, arraySorter, isPromise, sleep, sleepWithValue, sleepWithFunction, notTo, arrayToObject, arrayOfObjectsToObject, removeDuplicates, traverse, traverseVertically, project, copyPropsWithValue, copyPropsWithValueUsingRules, EnumMap, Enum, transition, pushUniqueKey, pushUniqueKeyOrChange, pushAt, memoize, fillWith, isDate, isEmpty, isStringADate, formatDate, dateFormatter, YYYY_MM_DD_hh_mm_ss_ToUtcDate, dateToObj, diffInDaysYYYY_MM_DD, subtractDays, addDays, previousDayOfWeek, getSameDateOrPreviousFridayForWeekends, isDateMidnight, setDateToMidnight, replaceAll, cleanString, repeat, oneIn, loopIndexGenerator, retryWithSleep, processExit };

@@ -28,10 +28,5 @@ # js-awe

const { plan } = require("js-awe")
const fun1 = val1 => Promise.resolve(val1 * 2) // fun1: 3*2 = 6
const fun2A = val2 => val2 + 1 // fun2A: 6 + 1 = 7
const fun3 = val3 => Promise.resolve(val3 + 3) // fun3: 7 + 3 = 10
const fun2B = val2 => Promise.resolve(val2 - 1) // fun2B: 6 - 1 = 5;
const fun4 = val4 => val4 + 2 // fun4: 5 + 2 = 7
const fun5 = ([val4, val5]) => val4 + val5 // fun5: 10 + 7 = 17; Promise.resolve(17)
let { fun1, fun2A, fun3, fun2B, fun4, fun5 } = exportDemoFunctions()
const myCalc = plan().build([

@@ -45,2 +40,14 @@ fun1,

myCalc(3).then(result => console.log(result)) //=> 17
// Just some simple functions to demonstrate the plan functionality
function exportDemoFunctions() {
return {
fun1: val1 => Promise.resolve(val1 * 2), // fun1: 3*2 = 6
fun2A: val2 => val2 + 1, // fun2A: 6 + 1 = 7
fun3: val3 => Promise.resolve(val3 + 3), // fun3: 7 + 3 = 10
fun2B: val2 => Promise.resolve(val2 - 1), // fun2B: 6 - 1 = 5;
fun4: val4 => val4 + 2, // fun4: 5 + 2 = 7
fun5: ([val4, val5]) => val4 + val5, // fun5: 10 + 7 = 17; Promise.resolve(17)
}
}
```

@@ -47,0 +54,0 @@

@@ -57,3 +57,3 @@ export default jsUtils;

export { repeat };
export { runEvery };
export { oneIn };
export { loopIndexGenerator };

@@ -313,3 +313,3 @@ export { retryWithSleep };

};
export function runEvery(period: any): {
export function oneIn(period: any): {
calls: (runFunc: any) => {

@@ -316,0 +316,0 @@ (...args: any[]): any;

@@ -121,9 +121,34 @@ export namespace RE {

* Add input rows which hash is not present in the target
* duplicates in the target will be deleted keeping the last row.
* @param isAsc undefined: does not order. true: return result in asc order. false: in desc order
* @param hashAddNoDups hash function for the input data
* @param addNoDupsToTheEnd input data
* @param hashMaster hash function for the target data
* @param master target data
*/
export const unionWithHashKeys: any;
export function unionWithHashKeysUnc<T,P>(
isAsc: boolean|undefined,
hashAddNoDups: (elem: T) => string,
addNoDupsToTheEnd: T[],
hashMaster: (elem: P) => string,
master: P[]
): (T|P)[];
/**
* Update target with input for rows with same hash
* Add to target the new rows from input with new hash.
* Add input rows which hash is not present in the target
* duplicates in the target will be deleted keeping the last row.
* @param isAsc undefined: does not order. true: return result in asc order. false: in desc order
* @param hashAddNoDups hash function for the input data
* @param addNoDupsToTheEnd input data
* @param hashMaster hash function for the target data
* @return a function ready to receive the target data
*/
export const updateWithHashKeys: any;
export function unionWithHashKeys<T,P>(
isAsc: boolean|undefined,
hashAddNoDups: (elem: T) => string,
addNoDupsToTheEnd: T[],
hashMaster: (elem: T) => string,
):(master: P[]) => (T|P)[];
export const between: any;

@@ -130,0 +155,0 @@ export const matchByPropId: any;

{
"name": "js-awe",
"version": "1.0.64",
"version": "1.0.65",
"homepage": "https://github.com/josuamanuel/js-awe",

@@ -5,0 +5,0 @@ "author": "josuamanuel@hotmail.com",

@@ -28,10 +28,5 @@ # js-awe

const { plan } = require("js-awe")
const fun1 = val1 => Promise.resolve(val1 * 2) // fun1: 3*2 = 6
const fun2A = val2 => val2 + 1 // fun2A: 6 + 1 = 7
const fun3 = val3 => Promise.resolve(val3 + 3) // fun3: 7 + 3 = 10
const fun2B = val2 => Promise.resolve(val2 - 1) // fun2B: 6 - 1 = 5;
const fun4 = val4 => val4 + 2 // fun4: 5 + 2 = 7
const fun5 = ([val4, val5]) => val4 + val5 // fun5: 10 + 7 = 17; Promise.resolve(17)
let { fun1, fun2A, fun3, fun2B, fun4, fun5 } = exportDemoFunctions()
const myCalc = plan().build([

@@ -45,2 +40,14 @@ fun1,

myCalc(3).then(result => console.log(result)) //=> 17
// Just some simple functions to demonstrate the plan functionality
function exportDemoFunctions() {
return {
fun1: val1 => Promise.resolve(val1 * 2), // fun1: 3*2 = 6
fun2A: val2 => val2 + 1, // fun2A: 6 + 1 = 7
fun3: val3 => Promise.resolve(val3 + 3), // fun3: 7 + 3 = 10
fun2B: val2 => Promise.resolve(val2 - 1), // fun2B: 6 - 1 = 5;
fun4: val4 => val4 + 2, // fun4: 5 + 2 = 7
fun5: ([val4, val5]) => val4 + val5, // fun5: 10 + 7 = 17; Promise.resolve(17)
}
}
```

@@ -47,0 +54,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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