Package Exports
- vijay-sample-demo
- vijay-sample-demo/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vijay-sample-demo) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
vijay-sample-demo
A tiny demo package that exports a couple of simple helper functions.
Install
npm install vijay-sample-demoIf you publish under a different name (e.g.,
@yourname/vijay-sample-demo), adjust the install command accordingly.
Usage (CommonJS)
const { greet, getMonths } = require('vijay-sample-demo');
console.log(greet('Alice')); // "Hello, Alice!"
console.log(getMonths());API
greet(name)
- Arguments:
name(string, optional) — name to greet; defaults to"world"
- Returns:
string— greeting message (e.g.,"Hello, Alice!")
getMonths()
- Returns:
string[]— array of month names (January through December)
License
MIT