Giter Site home page Giter Site logo

wifi-name's Introduction

wifi-name

Get current wifi name

Install

$ npm install wifi-name

Usage

const wifiName = require('wifi-name');

wifiName().then(name => {
	console.log(name);
	//=> 'wu-tang lan'
});

API

wifiName()

Returns a Promise for a string with the current wifi name.

wifiName.sync()

Returns a string with the current wifi name.

Related

License

MIT © Kevin Mårtensson

wifi-name's People

Contributors

kevva avatar msn0 avatar

Stargazers

Marc Carran avatar Aatmaj avatar Felipe  Venturino avatar Nelson Roque avatar 王阳 avatar Phablo Raylan avatar 雪山飞猪 avatar Hadi Modarres avatar Jamie Leviner avatar nodojo avatar Ten avatar C avatar BYUNGI avatar Guy avatar Humberto Rodríguez A. avatar Bachir AMIRI avatar Ertao avatar  avatar Thomas Brüggemann avatar Aditya Agarwal avatar Pedro Nauck avatar 导演 avatar Gustavo Siqueira avatar Fahad Murtaza avatar Yoshiya Hinosawa avatar Jannis R avatar Luis Ramos avatar Jerzerak avatar Kazato Sugimoto avatar lorezz avatar Alan Dickinson avatar Ishan Marikar avatar Fabio Dias Rollo avatar Angus H. avatar Sam Mason de Caires avatar  avatar  avatar Brandon Brown avatar Eirik L. Vullum avatar Luciano Battagliero avatar Ryan Burgess avatar netop://ウエハ avatar Breno Polanski avatar Tom Bamford avatar Michael Raguse avatar Ronan Guilloux avatar Yaniv Kessler avatar Johnie Hjelm avatar Fredrik Forsmo avatar maboiteaspam avatar Matias Singers avatar HIRAKI Satoru avatar Ryan Lelek avatar  avatar

Watchers

 avatar James Cloos avatar Matias Singers avatar shinnn avatar Sam Verschueren avatar Arthur Verschaeve avatar  avatar

wifi-name's Issues

Doesn't work on non-english Ubuntu distros

Command nmcli is localized on my Ubuntu 14.04. Here is my output

$ nmcli -t -f active,ssid dev wifi
tak:'FRITZ!Box Fon WLAN 7360 SL'
nie:'HTC Portable Hotspot'

In this case regex /^\s*yes:(.+)\s*$/gm doesn't match. Using iwgetid -r might be an alternative solution.

env: node\r: No such file or directory

Hello,

I just install globally wifi-name package, and I catch this error message :

env: node\r: No such file or directory

My node env:
OS : OS X 10.10.2
node -v : 0.12.0
npm -v : 2.7.0
which node : /usr/local/bin/node

Thanks for your work ! ;)

Profile name may not be the same as SSID!

basically the script just executes netsh wlan show profile name=[SSID] key=clear

The profile name may not hold the same value as the SSID! Sometimes the SSIDs have unspecific names and I don't know what I'm connected to. So I rename them to something useful in Manage wireless networks.

The SSID is useful too, so we shouldn't just discard it and replace with Profile. That means introducing a choice...

And God forbid if the Profile name has special characters in it, such as double-quotes ", hashes #, dashes - or UTF8 characters:

Platform Support

Something like this is named very abstractly and gives the impression that it's platform-agnostic. Mind mentioning platform support on the landing page? 👍

Throw a specific error when wifi is not actived

1/ On Mac, disable wifi
2/ run the example of README

The error return :
(node:27211) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Could not get SSID

expectation : return a specific error (Error: Wifi disabled. Can get SSID.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.