profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/rxaviers/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Rafael Xavier de Souza rxaviers PayPal Sao Paulo, Brazil http://rafael.xavier.blog.br Sr Sf Eng @paypal, @globalizejs project lead, former @jquery and @ibm, CS at USP (Brazil). Tech passionate. Like to solve problems, proactive and self learner

rxaviers/async-pool 435

Run multiple promise-returning & async functions with limited concurrency using native ES6/ES7

JSFoundation/standards 244

Giving web developers a voice in the standards process

rxaviers/cldrjs 155

Simple CLDR traverser

globalizejs/react-globalize 106

Bringing the i18n functionality of Globalize, backed by CLDR, to React

rxaviers/cldr-data-npm 37

Npm module for Unicode CLDR JSON data

rxaviers/cldr-data-downloader 15

Download tool for Unicode CLDR JSON data

rxaviers/cldr-data-bower 4

(DEPRECATED, use npm instead) Bower module for Unicode CLDR JSON data

rxaviers/cldr-data-full-npm 3

Npm module for Unicode CLDR JSON data

issue closedrxaviers/async-pool

another args to function

in ES6 can use ...theArgs for function

async function asyncPool(poolLimit, array, iteratorFn, ...theArgs) { ... const p = Promise.resolve().then(() => iteratorFn(item, array, theArgs));

in work i use that:

async function ticker(item, array, userId){
  return new Promise(base.findOne({'userId': userId, 'field': item}));
}

closed time in 2 hours

SIMBaIrk

issue commentrxaviers/async-pool

another args to function

Sorry for the delay here.. Revisiting your request, it seems what you need can be accomplished independently of the proposed asyncPool API change. User code can pass theArgs to the iteratorFn. I am happy to reopen if you demonstrate a use case where API change is mandatory. Thanks

SIMBaIrk

comment created time in 2 hours

issue commentrxaviers/async-pool

another args to function

Sorry for the delay here.. Sure thing, PR welcome. Thanks

SIMBaIrk

comment created time in 3 hours

startedbluebill1049/react-flip-numbers

started time in 4 hours

issue closedglobalizejs/globalize

numberParser not returning the expected value for locale "sh" or serbian language

Hello,

We are using the latest version of globalize.js For serbian or locale "sh",when we are trying to parse a number, For ex: 83, the number is converted to 83000.

The numberParser returns wrong value here for locale "sh".

In Serbian , (comma) is used as decimal separator which is same in the case of German.

numberparser

How this could be fixed? How can we get the correct output?

closed time in a day

PratikshaKumbhare

issue commentglobalizejs/globalize

numberParser not returning the expected value for locale "sh" or serbian language

It seems like CLDR supports Croatian (hr), but not Serbo-Croatian (sh) [1]

Globalize("hr").formatNumber(88.334)
// > '88,334'

Globalize("hr").parseNumber("88,334")
// > 88.334
1:
- This tells what's the likely language for HR: https://github.com/unicode-cldr/cldr-core/blob/master/supplemental/likelySubtags.json#L1463
- There's https://github.com/unicode-cldr/cldr-numbers-full/tree/master/main/hr
- There isn't a https://github.com/unicode-cldr/cldr-numbers-full/tree/master/main/sh
- https://github.com/unicode-cldr/cldr-localenames-full/blob/master/main/en/languages.json for figuring out the locale names
- https://github.com/unicode-cldr/cldr-localenames-full/blob/master/main/en/territories.json for figuring out the region names
PratikshaKumbhare

comment created time in a day

MemberEvent

issue commentglobalizejs/globalize

Migrate from JSF CLA bot to OpenJS Foundation EasyCLA

Thank you @brianwarner

brianwarner

comment created time in 7 days

pull request commentglobalizejs/globalize

Fix wrong week of year calculation

Thanks a lot

nightskylark

comment created time in 7 days

push eventglobalizejs/globalize

zhavoronkov.evgeny

commit sha 036dfd1cc03626f8fc69e295cfb96b0e8534c97f

Date: Fix wrong week of year calculation (#923) Fixes #909

view details

push time in 7 days

issue closedglobalizejs/globalize

Wrong week of year calculation for the every first week day.

Steps to reproduce in Node.js: (npm install globalize cldr-data)

Case 1.

var Globalize = require( "globalize" );
Globalize.load( require( "cldr-data" ).entireSupplemental() );
Globalize.load( require( "cldr-data" ).entireMainFor( "en" ) );
Globalize("en").formatDate(new Date(2021,0,3), {raw: 'w'});

It returns 1 but the weekData.firstDay is 0 in 'en' locale and weekData.minDays is 1, so the result should be 2. image

Case 2.

var Globalize = require( "globalize" );
Globalize.load( require( "cldr-data" ).entireSupplemental() );
Globalize.load( require( "cldr-data" ).entireMainFor( "de" ) );
Globalize("de").formatDate(new Date(2021,0,4), {raw: 'w'});

It returns 0 but the weekData.firstDay is 1 in 'de' locale and weekData.minDays is 4, so the result should be 1. image

Solution Here is a mistake in calculation: https://github.com/globalizejs/globalize/blob/master/src/date/format.js#L151 The previously calculated value of the value variable is the count of days in the first week in year that belongs to the previous year. In 'en' locale in 2021 it will be 5 (27-31 of December 2020). The dateDayOfYear( date ) returns a distance between the first day of year and the current day. For the 3th of January it will be 2. So our calculation is (5 (27-31 of December) + 2 (2-3 of January)) / 7. But there is no 1st of January here! What we need is to add +1 to the formula like this:

dateDayOfYear( date ) + 1 + value ) / 7

closed time in 7 days

nightskylark

PR merged globalizejs/globalize

Fix wrong week of year calculation

https://github.com/globalizejs/globalize/issues/909

+9 -2

0 comment

2 changed files

nightskylark

pr closed time in 7 days

startedmgdm/htmlq

started time in 13 days

issue closedrxaviers/async-pool

Failed to process the request

Excuse me, how can I retry a request if it fails and maintain the number of concurrent requests

closed time in a month

JiangTaoZzzz

issue commentrxaviers/async-pool

Failed to process the request

Closed in favor of https://github.com/rxaviers/async-pool/pull/26#issuecomment-902590892

JiangTaoZzzz

comment created time in a month

PR closed rxaviers/async-pool

feat: initiate retry on failure.

for example, when a slice fails to upload a large file, you need to try again.

Fixes #25

+141 -49

3 comments

3 changed files

JiangTaoZzzz

pr closed time in a month

pull request commentrxaviers/async-pool

feat: initiate retry on failure.

You're very welcome. I am going to close the PR and the linked issue. If there are any other points / use cases that can't be done this way, let me know. We can reconsider it.

JiangTaoZzzz

comment created time in a month

pull request commentrxaviers/async-pool

feat: initiate retry on failure.

Thank you very much for the details in #25 and for this PR, now the point is clear to me. cc @JiangTaoZzzz

Instead of implementing the retry mechanism in this library/fn, would it be possible to do it in the user code itself? This way we keep this library/fn simple and we are still able to fulfill such usecase. For example:

async function mySuperUpload(...args) {
  if (!await uploadAndRetryACoupleOfTimesBeforeItFails(...args)) {
    throw new Error("...");
  }
  return ...;
}

await asyncPool(2, [dataSlice1, dataSlice2, ...], mySuperUpload);
JiangTaoZzzz

comment created time in a month

issue commentglobalizejs/globalize

Wrong week of year calculation for the every first week day.

Perfect! 👍 Awesome you've already created a draft PR.

nightskylark

comment created time in a month

issue commentglobalizejs/globalize

Bug: Globalize number formatter is incorrect for numeric digits in supplemental plane

Awesome. Numbering system digits are set at https://github.com/globalizejs/globalize/blob/master/src/number/numbering-system-digits-map.js, stored as formatter properties at https://github.com/globalizejs/globalize/blob/master/src/number/format-properties.js#L63, then used here https://github.com/globalizejs/globalize/blob/master/src/number/format.js#L96. Their respective unit tests can be found https://github.com/globalizejs/globalize/blob/master/test/unit/number/format-properties.js and https://github.com/globalizejs/globalize/blob/master/test/unit/number/format.js.

greghuc

comment created time in a month

issue closedglobalizejs/globalize

[Info] OpenJS Conference & Collab Summit FYIs for Project Communities

Hi Globalize Community 🤗

I've been asked to help make sure that all the OpenJS Foundation project communities are aware that the deadline for our OpenJS Conference Call for Proposals has been extended through Feb. 28. Previously, this event was called 'Node + JS Interactive' and it leaned heavily toward Node.js. We're hoping to have a wider range of sessions about all the OpenJS Foundation projects, so we'd love to see presentations about Globalize!

I also wanted to make sure you're aware of the Collaborator's Summit, an event focused on project maintainers, collaborators & contributors. The goal for the collab summit is to provide opportunities for face-to-face working sessions within a single project or across multiple projects. So if you wanted to get your core team together you could do that, or if you want to have a session for new contributors to your project, or if you wanted to work across multiple OpenJS Foundation projects on issues like accessibility, privacy, security, modules, etc. you could do that too. If you're interested in securing session space at the collab summit, please ping me here, reach out on slack or twitter, or open an issue on the /summit repo.

The OpenJS World conference is June 23-24 and Collaborator's Summit is June 25-26 in Austin, TX. These are ticketed events, but members of OpenJS Foundation project communities are eligible for Travel Fund assistance. If you have questions or would like to find out more, please chime in on our /summit repo.

as always, let me know how I can help <3 Jory Burson OpenJS Foundation Community Manager

closed time in a month

jorydotcom

issue commentglobalizejs/globalize

[Info] OpenJS Conference & Collab Summit FYIs for Project Communities

Thanks for the communication, closing it as it's now outdated.

jorydotcom

comment created time in a month

issue closedglobalizejs/globalize

parseNumber not returning NaN for trailing decimal

I'm using latest version. Trying to parse a number onKeyUp in en locale. Globalize("en").numberParser()("123.") // returns the value 123 Shouldn't this return NaN?

closed time in a month

xtgrant

issue commentglobalizejs/globalize

parseNumber not returning NaN for trailing decimal

This is expected (since some use cases depend on this feature [1]) thought it could be revisited if there's strong argument against it.

1: Incrementally parsing a number input (as typed).

xtgrant

comment created time in a month

issue commentrxaviers/async-pool

Failed to process the request

Please, what have you tried?

JiangTaoZzzz

comment created time in a month

issue commentglobalizejs/globalize

Wrong week of year calculation for the every first week day.

Thanks for filing the issue and your detailed debugging. If you (or someone) can (a) confirm your logic matches UTS#35 and (b) submit a PR, it will be accepted. Thanks

nightskylark

comment created time in a month

issue closedglobalizejs/globalize

Missing globalize.cultures.js

I'm upgrading a really old script that uses globalize.cultures.js, and I can't seem to find any reference to it in the Readme or anywhere else. Is this still needed? Or is there a better place to find it?

closed time in a month

mrmowgli

issue commentglobalizejs/globalize

Missing globalize.cultures.js

Getting started can be found on our docs.

mrmowgli

comment created time in a month

issue closedglobalizejs/globalize

OpenJS - upcoming conference news

Wanted to share this FYI out to the Globalize community to let ya’ll know that the OpenJS Foundation has opened its call for speakers for the upcoming virtual OpenJS World event on 9 June 2021. We would love to make sure the project is well represented in the conference content! If anyone is interested and has more questions, wants help writing an abstract, or wants to get involved with the CFP Reviews, email me at jory @ thestoryofjory dot com or ping me in Slack.

We’d also love your help getting the word out about the event - if you’d be up to putting a link or banner on the project website, tweeting from your project account, etc. we would be very grateful!

closed time in a month

jorydotcom

issue commentglobalizejs/globalize

OpenJS - upcoming conference news

Thanks for the communication. Closing it since it's now outdated.

jorydotcom

comment created time in a month