Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 08:18
    FieryCod commented #1379
  • Jan 30 2019 10:01
    atif089 commented #1379
  • Jan 30 2019 10:01
    atif089 commented #1379
  • Jan 30 2019 10:01
    atif089 commented #1379
  • Jan 30 2019 04:11
    tclindner opened #1998
  • Jan 28 2019 05:21

    ljharb on master

    [eslint config] [base] [patch] … [eslint config] [patch] extend … Merge pull request #1996 from r… (compare)

  • Jan 28 2019 05:21
    ljharb closed #1996
  • Jan 28 2019 04:50
    ljharb synchronize #1996
  • Jan 27 2019 21:45
    ljharb closed #1997
  • Jan 27 2019 21:45

    ljharb on master

    [editorial] [react] fix typo [eslint config] [*] [deps] upda… (compare)

  • Jan 27 2019 21:39
    ljharb synchronize #1997
  • Jan 27 2019 21:39
    ljharb labeled #1997
  • Jan 27 2019 21:39
    ljharb labeled #1997
  • Jan 26 2019 18:14
    ljharb labeled #1996
  • Jan 26 2019 18:14
    ljharb labeled #1996
  • Jan 26 2019 18:13
    ljharb synchronize #1996
  • Jan 26 2019 18:05
    ljharb commented #1996
  • Jan 26 2019 08:55
    telmen opened #1997
  • Jan 24 2019 19:37
    peteclark3 commented #1689
  • Jan 24 2019 17:25
    ljharb commented #747
1point7point4
@1point7point4
You could ask him about using domFoo instead of $foo
What naming conventions does your colleague have in mind?
jsx
@riverspirit
He's for domFoo
1point7point4
@1point7point4
Do you/other colleagues have any particular concerns with doing it that way?
jsx
@riverspirit
Not really
1point7point4
@1point7point4
okay
GOPINATH DURAISAMY
@gopisathya
Hai
1point7point4
@1point7point4
no
Jordan Harband
@ljharb
@riverspirit sure, it's fine to do that
@riverspirit i wouldn't prefix like that for anything else tho.
@riverspirit a prefix of "dom" makes no sense, primarily because literally nobody does that, and literally everybody uses the $ prefix/
jsx
@riverspirit
Thanks for your thoughts on it @ljharb :)
What did you have in mind when you said "i wouldn't prefix like that for anything else tho"?
Jordan Harband
@ljharb
like for things that aren’t jquery objects
1point7point4
@1point7point4
it's not a jquery object though, just a selected one
Jordan Harband
@ljharb
that’s a jquery Object
1point7point4
@1point7point4
no, it's just a dom reference
Jordan Harband
@ljharb
no, it’s not
the $ function produces a jquery object, with jquery methods
1point7point4
@1point7point4
But he says "Hey, we're following airbnb styleguide for our project and I wanted to know if its ok to prefix $ sign when storing DOM references (I saw the jQuery section in the styleguide, but we aren't using jQuery)"
Jordan Harband
@ljharb
Ohhh sorry
1point7point4
@1point7point4
i.e. he's not actually using jQuery but is wondering about using $ anyway
Jordan Harband
@ljharb
@riverspirit in that case no, don’t use a prefix for dom refs
$ means jquery, and nobody uses prefixes for anything else
jsx
@riverspirit
Thanks @1point7point4 for clarifying my point.
Thanks for your thoughts again @ljharb
1point7point4
@1point7point4
you're welcome
Danilo Santos
@DanStos
Hi all,
Does anyone know if exists an async/await for IE11?
1point7point4
@1point7point4
yes
it's called callbacks
they're pretty good, you should try them sometime
if you don't like those you can try promises or tasks
promises are more popular but they're for normies
Jordan Harband
@ljharb
@danstos async/await is just promises
you must know how they work to use await properly.
and you can definitely shim promises in IE
wly
@ahkjxy
async/await shim?
async/await shim for IE?
1point7point4
@1point7point4
@DanStos use a polyfill
1point7point4
@1point7point4
Does anyone know of a good place that actually is for discussing JS in general?
jsx
@riverspirit
@1point7point4, try the ##javascript channel on freenode.
Jordan Harband
@ljharb
@ahkjxy you can’t shim syntax, you’d use Babel to transpile it. But the Airbnb guide doesn’t let you do that for async/await because the transpile version is too heavyweight
pseduo-god
@pseudo-god
This message was deleted
markdavis23
@markdavis23
Hat.sh | Online file encryption using the WebCryptoAPI
https://github.com/sh-dv/hat.sh
Miles D
@white-room
is there a consensus on factory function naming? #23.7 says to use camelCase when exporting single functions and #23.8 about PascalCase does not mention factories, so i would assume camelCase. also, what's the preferred naming convention for factory factions? createSomething / makeSomething / somethingFactory / etc?
Jordan Harband
@ljharb
yes, factory functions would be camelCase
there's no preferred convention, use whatever makes the most sense for your use case
ajay yadav
@ajay7868

can any one help this one

Write a program that takes two strings as input and outputs two numbers, n1 and n2.
The output values indicate a degree of matching between the two strings:

n1 : number of letters in one string that each match in value and
in position to a letter in the other string.

n2 : number of letters in one string that each match in value,
but not in position to a letter in the other string.

Some notes:

  • the output should be the same if the two strings were swapped
  • each letter instance in a string may only participate in one match.
  • if a letter instance can participate in either n1 or n2, it is to be counted towards n1.
  • the two strings may or may not be of the same length.

Some examples (str1, str2 -> n1,n2):

"abc", "abc" -> 3,0
"bca", "abc" -> 0,3
"aab", "abb" -> 2,0
"aab", "aba" -> 1,2
"abc", "aaa" -> 1,0

1point7point4
@1point7point4
@ajay7868 use Haskell.