1.0.2 • Published 2 years ago

prince-utils v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

prince-utils

Features

  • Log
  • ObjectFilter

Log

Log.success(message);
Log.danger(message);
Log.info(message);

ObjectFilter

ObjectFilter.filter();

Filter an array of objects based on a condition while also filtering out unspecified keys.

Use Array.prototype.filter() to filter the array based on the predicate fn so that it returns the objects for which the condition returned a truthy value. On the filtered array, use Array.prototype.map() to return the new object using Array.prototype.reduce() to filter out the keys which were not supplied as the keys argument.

   ObjectFilter.filter(data, filter list, condition) 
   ObjectFilter.filter(data, [key,key], index => index)
1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago