Huawei Nova 8i Specifications, Design Revealed Ahead of Launch
Huawei Nova 8i Specifications, Design Revealed Ahead of Launch


Huawei Nova 8i has gone live on the official Malaysian online store ahead of its launch, which is expected next week. Although the phone has not been officially announced, details such as its full specifications and its design have been revealed thanks to a listing on the official company website. However, its pricing and availability were not included in the listing. Huawei Nova 8i will be an offshoot of the Huawei Nova 8 launched in December last year. It is listed to come with a quad camera setup, a 16-megapixel selfie camera, and support 66W fast charging. The phone is powered by the Qualcomm Snapdragon 662 SoC.

Huawei Nova 8i launch details

GizmoChina reports that the Huawei Nova 8i will launch in Malaysia on July 7. Ahead of the official launch, the phone has been listed on the online store, revealing everything there is about the phone. Its pricing and availability will likely be announced on the launch day.

Huawei Nova 8i has a pill-shaped cut out for the selfie camera up front, placed on the top left corner of the screen. There is a circle-shaped camera module at the back which houses four sensors and a side-mounted fingerprint sensor. The phone will launch in three colour options – Moonlight Silver, Interstellar Blue, Starry Black.

Huawei Nova 8i specifications

The company site has listed full specification details of the Huawei Nova 8i ahead of the launch. The phone runs on EMUI 11 and features a 6.67-inch full-HD+ (1,080×2,376 pixels) display with 94.7 percent screen-to-body ratio. It is powered by the octa-core Qualcomm Snapdragon 662 SoC paired with 8GB RAM. Internal storage is listed to be at 128GB.

There is a quad camera setup on the Huawei Nova 8i that includes a 64-megapixel main camera, 8-megapixel ultra-wide-angle sensor, and two additional 2-megapixel sensors at the back. Up front, the phone has a 16-megapixel main camera on board for selfies and video calls.

Huawei Nova 8i packs a 4,300mAh battery with 66W SuperCharge support. There is a side-mounted fingerprint sensor on board. Huawei says the phone can get charged up to 60 percent in 17 minutes, and fully charged in 38 minutes. Connectivity options include Wi-Fi 802.11 a/b/g/n/ac, 2.4 GHz/5 GHz, Wi-Fi Direct support, Bluetooth v5, and more.




Source link

How to Write a Simple NPM Package
How to Write a Simple NPM Package


image

Julian Hacker Noon profile picture

Lately, I had to write an NPM package for browsers. So I sat down and start thinking about how one should do this in 2021.

We usually use bundlers and transpilers like Rollup and Babel, and these are great tools. Especially when you need to write something more significant, more complicated, which uses third-party modules and with performance in mind from the beginning. However, is this required when you need a simple tool published in the NPM registry? No, it isn’t in 2021. Let’s see why.

With ES2015 standard (or ES6), we got built-in modules in JavaScript. Previously it was supported by third-party tooling like RequireJS, for example. In Node, we still use CommonJS in many cases. ES2015 brought a standardization for JavaScript modules. A couple of years later, we have got full support for them on the browser’s side and in Node. That’s great. But what does it mean?

Imagine that you only need a Typescript compiler to prepare your NPM package written in ES2020 standard. Of course, if you want to write in Typescript. Otherwise, it is also optional. But I think using it is quite reasonable. Anyway, yes, it is possible to use just the language itself without additional processes. What’s even better you can now use modern CDN services like Skypack and then import your tool in the browser:

<html>
  <body>
    <script type="module">
      import smoothScrollTop from 'https://cdn.skypack.dev/smooth-scroll-top';
    // do something with it here
    </script>
  </body>
</html>

Ok, so how to do that?

First of all, you need a couple of changes in your package.json file.

Here is what we need (example of mine):

"type": "module"

, – required for proper interpretation of .js files

"exports": "./build/index.js"

, – tels which file is our main export, we should use it instead

main

 or

browser

"engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0"}

, – this will allow checking proper versions of Node, which supports ES2015 modules

Your build script could be as simple as

"build": "tsc"

with

tsconfig.json

configuration similar to this one.

All you need to do next is to publish your code to the NPM registry. Without any transpiling. Just modern JavaScript code.

If you use Typescript and export definitions, you can even use your package in Deno land. Skypack will allow that. Read more here.

It is straightforward nowadays. If you want to read more details, please check my article. You’ll also find some more information about more complicated setups and packages.

You can also check the GitHub repository of Smooth Scroll Top library. You can treat it as an example.

Follow me on Twitter and GitHub.

Julian Hacker Noon profile picture

Tags

Join Hacker Noon