An open API service indexing awesome lists of open source software.

https://github.com/revathskumar/math-random-string


https://github.com/revathskumar/math-random-string

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

          

## Math.random().toString(36)

`Math.random().toString(36)` will produce result of different length in different browsers.

In `Firefox` it result a string of length `<15`
In `Chrome` it results in a string of length `24`.

### Test

```js
describe('Math.random().toString(36)', () => {
it('length should be below 15', () => {
expect(Math.random().toString(36).length).to.be.at.below(15);
});
});
```

[![Sauce Test Status](https://saucelabs.com/browser-matrix/revathskumar.svg)](https://saucelabs.com/u/revathskumar)