https://github.com/revathskumar/math-random-string
https://github.com/revathskumar/math-random-string
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/revathskumar/math-random-string
- Owner: revathskumar
- Created: 2016-11-27T19:02:32.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-29T18:47:11.000Z (over 9 years ago)
- Last Synced: 2025-06-03T21:26:47.205Z (about 1 year ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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);
});
});
```
[](https://saucelabs.com/u/revathskumar)