Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
blopker committed Jan 13, 2025
1 parent 4164afe commit 63d62ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 34 deletions.
34 changes: 1 addition & 33 deletions codebook/src/splitter.rs
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
use std::collections::HashSet;

// fn should_skip_word(word: &str) -> bool {
// if word.len() <= 1 {
// return true;
// }

// false
// }

// pub fn split_into_words(text: &str) -> HashSet<String> {
// let mut words_to_check = HashSet::new();

// // Split text into words and handle punctuation
// for word in text.split(|c: char| !c.is_alphanumeric()) {
// if word.is_empty() || should_skip_word(word) {
// continue;
// }

// // Handle camelCase and PascalCase
// let parts = split_camel_case(word);

// for part in parts {
// if !should_skip_word(&part) {
// words_to_check.insert(part);
// }
// }
// }

// words_to_check
// }

#[derive(PartialEq)]
enum CharType {
Lower,
Expand All @@ -51,7 +19,7 @@ pub fn split_camel_case(s: &str) -> Vec<SplitCamelCase> {
for (i, c) in s.chars().enumerate() {
assert!(
!c.is_whitespace(),
"There should be no whitespace in the input."
"There should be no white space in the input."
);
let char_type = if c.is_ascii_uppercase() {
CharType::Upper
Expand Down
2 changes: 1 addition & 1 deletion examples/example.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Funktion to validate user inputt
function validateInputt(userInputt: number | string) {
if (typeof userInputt !== "number") {
console.logg("Pleese enter a valid numbr");
console.log("Pleese enter a valid numbr");
return false;
}

Expand Down

0 comments on commit 63d62ec

Please sign in to comment.