
Security News
Node.js Moves Toward Stable TypeScript Support with Amaro 1.0
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
react-native-device
Advanced tools
A wrapper for the native iOS UIDevice & Android Build class allowing you to access device properties and screen dimensions. Currently only for React Native iOS, Android support in progress.
First install the package to your project from NPM...
npm install react-native-device --save
Then within the package folder just add both the .h
and .m
classes to your project...
Device.isIpad()
The device model is of type iPad
Device.isIphone()
The device model is of type iPhone
Device.model
The device model, such as iPhone 5
or iPad Air
- All model options
Device.deviceName
The device name, such as John Smith's iPhone
Device.systemName
The device OS name, such as iPhone OS
Device.systemVersion
The device OS version, such as 8.4
'use strict';
var Device = require('react-native-device');
var ExampleApp = React.createClass({
render: function() {
if (Device.isIpad()) {
// return iPad layout
} else {
// return iPhone layout
}
}
});
FAQs
UIDevice wrapper for React Native
The npm package react-native-device receives a total of 15 weekly downloads. As such, react-native-device popularity was classified as not popular.
We found that react-native-device 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
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.