Created
December 1, 2021 21:50
-
-
Save subdigital/d5e968e8ef044fa1c88dc23e952dafe9 to your computer and use it in GitHub Desktop.
Boop script that allows camelCase to work on lines
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
{ | |
"api": 1, | |
"name": "Camel Case Lines", | |
"description": "Camel Case, but for each line", | |
"author": "Ben Scheirman", | |
"icon": "tortoise", | |
"tags": "camelCase" | |
} | |
**/ | |
const { camelCase } = require('@boop/lodash.boop') | |
function camelText(string) { | |
const strings = string.split(/\s+/); | |
return strings.map ((s) => camelCase(s)).join("\n") | |
} | |
function main(input) { | |
input.text = camelText(input.text); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment