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

absurdum

Package Overview
Dependencies
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

absurdum - npm Package Compare versions

Comparing version 0.9.2 to 0.10.0

src/strings/padStart.js

2

package.json
{
"name": "absurdum",
"version": "0.9.2",
"version": "0.10.0",
"description": "Reducio Ad Absurdum - The Riduculous Application of Reduce",

@@ -5,0 +5,0 @@ "keywords": [

@@ -41,2 +41,3 @@ [![npm](https://img.shields.io/npm/v/absurdum.svg)](https://www.npmjs.com/package/absurdum)

- [endsWith][strings.endswith]
- [padStart][strings.padStart]
- [reverse][strings.reverse]

@@ -47,2 +48,3 @@ - [startsWith][strings.startswith]

[strings.endswith]: ./docs/strings.md#stringsendswithstring-substr
[strings.padStart]: ./docs/strings.md#stringspadstartstring-length-substr
[strings.reverse]: ./docs/strings.md#stringsreversestring

@@ -49,0 +51,0 @@ [strings.startswith]: ./docs/strings.md#stringsstartswithstring-substr

export const filter = (array, predicate) => {
return array.reduce((acc, curr) => {
return (predicate(curr)) ? acc.concat([curr]) : acc;
if (predicate(curr)) {
acc.push(curr);
}
return acc;
}, []);
};
export const map = (array, func) => {
return array.reduce((acc, curr) => {
return acc.concat([func(curr)]);
acc.push(func(curr));
return acc;
}, []);
};
export const reverse = (array) => {
return array.reduce((acc, curr, idx, arr) => {
return acc.concat([arr[arr.length - idx - 1]]);
acc.push(arr[arr.length - idx - 1]);
return acc;
}, []);
};
export { endsWith } from './endsWith.js';
export { padStart } from './padStart.js';
export { reverse } from './reverse.js';
export { startsWith } from './startsWith.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