Socket
Socket
Sign inDemoInstall

its-set

Package Overview
Dependencies
4
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    its-set

Deep check if an identifier is defined and not null


Version published
Weekly downloads
10K
decreased by-14.14%
Maintainers
1
Install size
2.26 MB
Created
Weekly downloads
 

Readme

Source

npm-base

A base package for creating NPM packages with ES2015.


Writing in ES2015 is an amazing experience. Setting up babel and the development environment in a kind of a pain.

If you want to write a NPM module in ES2015 and publish to NPM with backward compatibility, this is the easiest way.

Basic Usage

  • Simply clone this project.
  • Change the package.json as you want.
  • lib/index.js in your entry point.
  • Then publish to npm via npm publish.

Linting

  • ESLINT support is added to the project.
  • It's configured for ES2015 and inherited configurations from graphql/graphql-js.
  • Use npm run lint to lint your code and npm run lintfix to fix common issues.

Testing

  • You can write test under __test__ directory anywhere inside lib including sub-directories.
  • Then run npm test to test your code. (It'll lint your code as well).
  • You can also run npm run testonly to run tests without linting.

ES2015 Setup

  • ES2015 support is added with babel6.
  • After you publish your project to NPM, it can be run on older node versions and browsers without the support of Babel.
  • This project uses ES2015 and some of the upcoming features like async await.
  • You can change them with adding and removing presets.
  • All the polyfills you use are taken from the local babel-runtime package. So, this package won't add any global polyfills and pollute the global namespace.

Kudos

  • Babel6 and the team behind it.
  • Facebook's graphql-js authors for ESLint configurations and for the directory structure.

FAQs

Last updated on 20 Jul 2016

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc