Skip to content

Instantly share code, notes, and snippets.

View taulutwashi's full-sized avatar
🏠
Working from home

Taulut Hossain Washi taulutwashi

🏠
Working from home
  • Ami Probashi
  • Dhaka,Bangladesh
View GitHub Profile
@taulutwashi
taulutwashi / withPreventDoubleClick.js
Last active July 23, 2018 06:29
React Native- Prevent Double click
import React from 'react';
import debounce from 'lodash.debounce'; // 4.0.8
const withPreventDoubleClick = (WrappedComponent) => {
class PreventDoubleClick extends React.PureComponent {
debouncedOnPress = () => {
this.props.onPress && this.props.onPress();
}
@getify
getify / 1.js
Last active August 4, 2023 06:24
Converting English number sentences ("one hundred forty two point three") to numeric digits ("142.3")
convert("one hundred five"); // "105"
convert("six hundred and fifty three"); // "653"
convert("zero zero one two three"); // "123"
convert("twelve o three"); // "1203"
convert("thirteen zero nine"); // "1309"
convert("fifteen sixteen"); // "1516"
convert("fourteen ninety two"); // "1492"
convert("nineteen ten"); // "1910"
convert("twelve hundred"); // "1200"
convert("twenty three hundred"); // "2300"