Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
react-simple-timefield
Advanced tools
Simple React time input field, check out demo.
npm install --save react-simple-timefield
#for React <16 use: npm install --save react-simple-timefield@1
import TimeField from 'react-simple-timefield';
...
<TimeField
value={time} // {String} required, format '00:00' or '00:00:00'
onChange={(event, value) => {...}} // {Function} required
input={<MyCustomInputElement />} // {Element} default: <input type="text" />
inputRef={(ref) => {...}} // {Function} input's ref
colon=":" // {String} default: ":"
showSeconds // {Boolean} default: false
/>
import TimeField from 'react-simple-timefield';
class App extends React.Component {
constructor(...args) {
super(...args);
this.state = {
time: '12:34'
};
this.onTimeChange = this.onTimeChange.bind(this);
}
onTimeChange(event, time) {
this.setState({time});
}
render() {
const {time} = this.state;
return (
<TimeField value={time} onChange={this.onTimeChange} />
);
}
}
There is a breaking change in version 3.
The onChange
callback property will be called with two arguments.
// Before:
<TimeField onChange={(value) => console.log(value)} />
// After:
<TimeField onChange={(event, value) => console.log(event, value)} />
For running demo locally, replace:
import TimeField from '../';
// to
import TimeField from '../src';
in demo/index.tsx
file.
# run development mode
cd demo
npm install
npm install --only=dev
npm run dev
npm install
npm install --only=dev
npm test
npm run format
npm run build
MIT License. Free use and change.
FAQs
Simple React time input field
The npm package react-simple-timefield receives a total of 9,150 weekly downloads. As such, react-simple-timefield popularity was classified as popular.
We found that react-simple-timefield demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.