Git Product home page Git Product logo

decancer's People

Contributors

andybalaam avatar dependabot[bot] avatar emmiegit avatar null8626 avatar voltrexkeyva avatar yossipossi1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

decancer's Issues

Add safety comments for unsafe portions of code.

See #14 for full comments.

Some portions utilize unsafe code to optimize performance. It would be useful for developers (current and future) if the purpose and invariants of the unsafe code were laid out in a comment to prevent violations.

`cure` hangs when fed specific character

I.e. when fed unicode character “ˑ” (U+02D1) (Modifier Letter Half Triangular Colon):

fn main() {
    println!("{}", decancer::cure("ˑ").as_str());
    println!("This never prints.");
}

`decancer` automatically lowercases all characters

Hi there,

I'm experiencing an issue where decancer automatically lowercases all uppercase letters. As far as I understand, this is unintentional behavior (since it is not documented anywhere I looked). If it is intentional, could we have an option that keeps the case of non-violating characters?

Issue Details

  • decancer Version: 2.0.2
  • macOS Version: 14.3.1
  • Chip: Apple M2 Pro
  • Architecture: arm64
  • Node.js Version: v20.4.0
  • Behavior: The package automatically converts all uppercase letters to lowercase.
  • Expected Behavior: The case of non-violating characters should be preserved.

Minimal Reproduction

import decancer from "decancer"

console.log(decancer("Test").toString()) // Expected output: "Test", actual output: "test"
console.log(decancer("TeSt").toString()) // Expected output: "TeSt", actual output: "test"

Python bindings?

Is your feature request related to a problem?

There currently aren't any good libraries for decancering text in python.

Describe the solution you'd like

I'd like python bindings using a lib such as PyO3.

Describe alternatives you've considered

I tried reinventing the wheel but failed and would love to integrate this perfectly working library into my python projects as well.

Wrong type definition ?

Hi @null8626 ,
Thank you for providing this very fast and bright library !

On VSCode, I'm putting some coding rules with TS and Eslint (only on IDE, it's still a JS project), I'm having an error on decancer function

This expression is not callable.
Type 'typeof import("c:/Users/Administrator/WebstormProjects/classified-ads/node_modules/decancer/src/typings")' has no call signatures.

Undefined behavior in tests

range: MaybeUninit::uninit().assume_init(),
This is always undefined behavior, as although not read it is still a value that is being created and passed to llvm as noundef. This will cause aborts in a couple Rust versions, when this pattern is compiled to ud2 (undefined instruction, abort instantly).

This is already being caught by running clippy locally, which I suggest is added to CI, under the clippy::uninit_assumed_init lint.

Implement unicode bidi support

Ever since July 2023, i have been thinking about adding back Arabic and Hebrew support for decancer without causing issues because of their right-to-left madness. Then i've found unicode-bidi which rerenders your mixed RTL/LTR text in memory as it were to be rendered by a web browser.

The plan is to somehow implement its algorithm here - an attempt has been in the works since then, but due to school and the complexity of Unicode's bidirectional algorithm, it has been in hiatus for months.

Because of this, development on this library has (publicly) stagnated as the attention has been directed to this enhancement.

feature request: equal/startsWith/endsWith

I allow users to create simple patterns with asterisks which boils down to equal/startsWith/endsWith/contains. This is currently the only missing feature from adopting this library in production.

  • test -> equal
  • test* -> startsWith
  • *test -> endsWith
  • *test* -> contains

I'd really love to see these functions being added <3. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.