Code Monkey home page Code Monkey logo

Comments (6)

donnut avatar donnut commented on August 23, 2024 1

The API of ramda, which is the lead for typescript-ramda, only returns string[]. If you want to add the additional data from str.match you better start a issue on ramda/ramda

from npm-ramda.

wclr avatar wclr commented on August 23, 2024

Aso mybe to consider more concrete type for the result instead of any? something like:
string[] & {index: number, input: string}

from npm-ramda.

wclr avatar wclr commented on August 23, 2024

Seem to be fixed but not published, but also consider my second proposal about return type string[] & {index: number, input: string}

I'm also not sure what thy mean by simbols and regexp result
https://www.typescriptlang.org/docs/handbook/symbols.html

from npm-ramda.

donnut avatar donnut commented on August 23, 2024

Can you check if #87 works for you?
I'm not sure why you want to add {index: number, input: string} to the returned array or strings.
I haven't worked with Symbols much so I can't answer that question. Needs to dig into that topic for sure.

from npm-ramda.

wclr avatar wclr commented on August 23, 2024

{index: number, input: string} - see the result of str.match operation

from npm-ramda.

wclr avatar wclr commented on August 23, 2024
> "something".match(/thing/)
[ 'thing', index: 4, input: 'something' ]
>

from npm-ramda.

Related Issues (20)

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.