Skip to content

Commit

Permalink
Merge pull request #6 from bchainhub/update/repo-01
Browse files Browse the repository at this point in the history
Update/repo 01
  • Loading branch information
rastislavcore authored Oct 23, 2023
2 parents 30d6a63 + 412dd7a commit 8ed3e94
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5,541 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ results
npm-debug.log
node_modules
yarn.lock
package-lock.json

.DS_Store
.AppleDouble
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CORE License v1.0
CORE License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"),
Expand Down
41 changes: 21 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
# ican.js

ICAN and BCAN validation, formatting and conversion in Javascript.
ICAN and BCAN validation, formatting, and conversion in JavaScript.

ICAN.js follows the [ISO 13616 IBAN Registry technical specification](https://www.swift.com/standards/data-standards/iban) with the addition of the Crypto addresses.
ICAN.js adheres to the [ISO 13616 IBAN Registry technical specification](https://www.swift.com/standards/data-standards/iban) and includes support for Crypto addresses.

## Usage

ICAN.js is compatible with both commonjs and AMD module definition.
ICAN.js is compatible with both CommonJS and AMD module definitions.

### NPM

You can install [@cryptohub/ican from NPM](https://www.npmjs.com/package/@cryptohub/ican) using Yarn, NPM or another tool.
You can install [@blockchainhub/ican from NPM](https://www.npmjs.com/package/@blockchainhub/ican) using Yarn, NPM, or another tool.

> Yarn
```sh
yarn add @cryptohub/ican
yarn add @blockchainhub/ican
```

> NPM
```sh
npm i @cryptohub/ican
npm i @blockchainhub/ican
```

### In node.js

```js
var ICAN = require('@cryptohub/ican');
var ICAN = require('@blockchainhub/ican');
ICAN.isValid('hello world'); // false
ICAN.isValid('BE68539007547034'); // true
```

### In the browser

Using a module loader (AMD or commonjs) or directly through the global ```ICAN``` object:
You can use a module loader (AMD or CommonJS) or access it directly through the global ```ICAN``` object:

```html
<script src="ican.js"></script>
Expand All @@ -45,31 +47,30 @@ Using a module loader (AMD or commonjs) or directly through the global ```ICAN``

### With React

Use in the react is easy. For example:
Using ICAN.js with React is easy. For example:

```js
import Ican from '@cryptohub/ican';
import Ican from '@blockchainhub/ican';
Ican.isValid('hello world');
Ican.isValid('BE68539007547034');
```

## API

* isValid(ican)
* toBCAN(ican, separator)
* fromBCAN(countryCode, bcan)
* isValidBCAN(countryCode, bcan)
* printFormat(ican, separator)
* electronicFormat(ican)
- isValid(ican)
- toBCAN(ican, separator)
- fromBCAN(countryCode, bcan)
- isValidBCAN(countryCode, bcan)
- printFormat(ican, separator)
- electronicFormat(ican)

## Contributions

Feel free to contribute in any way.
We welcome contributions in any form. Here's how you can help:

We appreciate:
- Fork [this repository](/fork)
- Open [pull request](/pulls)
- Send us some Øres / ₡ores: [cb7147879011ea207df5b35a24ca6f0859dcfb145999](https://blockindex.net/address/cb7147879011ea207df5b35a24ca6f0859dcfb145999)
- Open a [pull request](/pulls)
- Support us with some Øres / ₡ores: [cb7147879011ea207df5b35a24ca6f0859dcfb145999](https://blockindex.net/address/cb7147879011ea207df5b35a24ca6f0859dcfb145999)
- Star this repository

## Epigram
Expand Down
Loading

0 comments on commit 8ed3e94

Please sign in to comment.