lodash#shuffle JavaScript Examples
The following examples show how to use
lodash#shuffle.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Videos.js From ebpf.io-website with Creative Commons Attribution 4.0 International | 6 votes |
componentDidMount() {
this.setState({
videos: shuffle([
"https://www.youtube.com/embed/mFxs3VXABPU?start=12&enablejsapi=1",
"https://www.youtube.com/embed/7pmXdG8-7WU?start=7&enablejsapi=1",
"https://www.youtube.com/embed/_Iq1xxNZOAo?start=45&enablejsapi=1",
"https://www.youtube.com/embed/U3PdyHlrG1o?start=7&enablejsapi=1",
"https://www.youtube.com/embed/ZYBXZFKPS28?start=0&enablejsapi=1",
"https://www.youtube.com/embed/AV8xY318rtc?start=7&enablejsapi=1",
"https://www.youtube.com/embed/Qhm1Zn_BNi4?start=8&enablejsapi=1",
"https://www.youtube.com/embed/slBAYUDABDA?start=3&enablejsapi=1",
"https://www.youtube.com/embed/wyfhjr_ufag?start=6&enablejsapi=1",
"https://www.youtube.com/embed/PJY-rN1EsVw?start=0&enablejsapi=1",
"https://www.youtube.com/embed/_5Z2AU7QTH4?start=6&enablejsapi=1",
"https://www.youtube.com/embed/6N30Yp5f9c4?start=0&enablejsapi=1",
]),
});
}
Example #2
Source File: Main.js From cord-19 with Apache License 2.0 | 6 votes |
function SearchSuggestions() {
return (
<>
<h4>Try searching for...</h4>
<List>
{shuffle(sampleQueries)
.slice(0, 3)
.map((query, i) => (
<List.Item key={i}>
<Link to={'/search?query=' + encodeURIComponent(query)}>
{query}
</Link>
</List.Item>
))}
</List>
</>
);
}