-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
emon5122
committed
Oct 16, 2023
0 parents
commit 3fc0046
Showing
15 changed files
with
3,397 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Publish | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8.9.2 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.8.1 | ||
cache: "pnpm" | ||
- run: pnpm install --frozen-lockfile | ||
- name: Create Release Pull Request or Publish | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: pnpm run release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Testing | ||
on: | ||
push: | ||
branches: | ||
- "**" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8.9.2 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.8.1 | ||
cache: "pnpm" | ||
- run: pnpm install --frozen-lockfile | ||
- run: pnpm run ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.changeset | ||
.github | ||
.git | ||
src | ||
index.test.ts | ||
pnpm-lock.yaml | ||
README.md | ||
renovate.json | ||
tsconfig.json | ||
.nvmrc | ||
.npmrc | ||
.gitignore | ||
CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20.8.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Copyright (c) 2023 Nexis LTD | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Country | ||
|
||
[![Build](https://github.com/nexisltd/country/actions/workflows/publish.yml/badge.svg)](https://github.com/nexisltd/country/actions/workflows/publish.yml) | ||
[![Test](https://github.com/nexisltd/country/actions/workflows/test.yml/badge.svg)](https://github.com/nexisltd/country/actions/workflows/test.yml) | ||
[![NPM Version](https://img.shields.io/npm/v/@nexisltd/country.svg)](https://www.npmjs.com/package/@nexisltd/country) | ||
[![Github Repo Size](https://img.shields.io/github/repo-size/nexisltd/country.svg)](https://github.com/nexisltd/country) | ||
[![LICENSE](https://img.shields.io/npm/l/npm-badger.svg)](https://github.com/nexisltd/country/blob/master/LICENSE) | ||
[![Contributors](https://img.shields.io/github/contributors/nexisltd/country.svg)](https://github.com/nexisltd/country/graphs/contributors) | ||
[![Commit](https://img.shields.io/github/last-commit/nexisltd/country.svg)](https://github.com/nexisltd/country/commits/main) | ||
[![jsDeliver](https://data.jsdelivr.com/v1/package/npm/@nexisltd/country/badge)](https://www.jsdelivr.com/package/npm/@nexisltd/country) | ||
|
||
Coming Soon | ||
|
||
## Installation | ||
|
||
To install the `country` library, you can use npm or yarn or pnpm: | ||
|
||
```bash | ||
npm install @nexisltd/country | ||
# or | ||
yarn add @nexisltd/country | ||
# or | ||
pnpm install @nexisltd/country | ||
``` | ||
|
||
## Usage | ||
|
||
Here's how you can use the library in your JavaScript or TypeScript code: | ||
|
||
```javascript | ||
import {findNationality} from '@nexisltd/country'; | ||
|
||
const nationality = findNationality("United States"); | ||
|
||
console.log(nationality); | ||
``` | ||
|
||
## License | ||
|
||
This library is open-source and available under the [MIT License](LICENSE). | ||
|
||
--- | ||
|
||
Feel free to use this library to enhance the date formatting in your projects, and if you have any questions or suggestions, don't hesitate to [open an issue](https://github.com/nexisltd/country/issues) or [contribute](https://github.com/nexisltd/country/pulls) to its development. | ||
|
||
Happy coding! 📅🚀 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { describe, expect, it } from "vitest"; | ||
import { findNationality } from "./src"; | ||
|
||
describe("Nationality", () => { | ||
it("Checks with an example country and matches if it's right.", () => { | ||
expect(findNationality("United States")).toBe("American"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"name": "@nexisltd/country", | ||
"version": "0.0.1", | ||
"description": "An utility package to deal with countries", | ||
"private": false, | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"dev": "vitest", | ||
"test": "vitest run", | ||
"build": "tsup src/index.ts --format cjs,esm --dts", | ||
"lint": "tsc", | ||
"ci": "pnpm run lint && pnpm run test && pnpm run build", | ||
"release": "pnpm run lint && pnpm run test && pnpm run build && changeset publish" | ||
}, | ||
"keywords": [ | ||
"date-translator", | ||
"date-to-word-translator", | ||
"date2word", | ||
"date-to-word" | ||
], | ||
"author": "Team Nexis", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@changesets/cli": "^2.26.2", | ||
"@types/node": "^20.8.6", | ||
"@types/number-to-words": "^1.2.1", | ||
"tsup": "^7.2.0", | ||
"typescript": "^5.2.2", | ||
"vitest": "^0.34.6" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/nexisltd/country.git" | ||
}, | ||
"homepage": "https://github.com/nexisltd/country#readme", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/nexisltd/country/issues" | ||
}, | ||
"engines": { | ||
"node": ">=16.0.0" | ||
} | ||
} |
Oops, something went wrong.