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.69.0 to 0.70.0

docs/strings/camelCase.md

26

dist/absurdum.esm.js

@@ -889,2 +889,27 @@ /**

/**
* camelCase updates a string to camelcase
*
* @param {string} [string=''] input string
* @returns {string} returns new camelCase string
*
* @example
* const result = strings.camelCase('--BEST_friend--');
* console.log(result);
* > 'bestFriend'
*/
function camelCase (string = '') {
let first = true;
const res = string.replace(/[\u2019']/, '').split(/[\u002D\u2014\-_\s]+/).reduce((acc, word) => {
if (first && word.length > 0) {
word = word.toLowerCase();
first = false;
} else {
word = word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
}
return acc + word;
}, '');
return res;
}
/**
* Chomp removes record separator characters (ex \n, \r, \r\n) from the end of a string.

@@ -1231,2 +1256,3 @@ *

__proto__: null,
camelCase: camelCase,
chomp: chomp,

@@ -1233,0 +1259,0 @@ endsWith: endsWith,

2

package.json
{
"name": "absurdum",
"version": "0.69.0",
"version": "0.70.0",
"description": "Reductio Ad Absurdum - The Ridiculous Application of Reduce",

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

@@ -180,2 +180,3 @@ [![GitHub Releases](https://img.shields.io/github/release/vanillaes/absurdum.svg)](https://github.com/vanillaes/absurdum/releases)

- [camelCase][strings.camelCase]
- [chomp][strings.chomp]

@@ -191,2 +192,3 @@ - [endsWith][strings.endswith]

[strings.camelCase]: ./docs/strings/camelCase.md
[strings.chomp]: ./docs/strings/chomp.md

@@ -193,0 +195,0 @@ [strings.endswith]: ./docs/strings/endsWith.md

@@ -0,1 +1,2 @@

export { camelCase } from "./camelCase.js";
export { chomp } from "./chomp.js";

@@ -2,0 +3,0 @@ export { endsWith } from "./endsWith.js";

@@ -0,1 +1,2 @@

export { camelCase } from './camelCase.js';
export { chomp } from './chomp.js';

@@ -2,0 +3,0 @@ export { endsWith } from './endsWith.js';

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