Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename the Core module to CKB module #400

Closed
Keith-CY opened this issue Nov 21, 2019 · 3 comments
Closed

Rename the Core module to CKB module #400

Keith-CY opened this issue Nov 21, 2019 · 3 comments
Assignees

Comments

@Keith-CY
Copy link
Member

No description provided.

@Keith-CY Keith-CY self-assigned this Nov 21, 2019
@ashchan
Copy link
Contributor

ashchan commented Nov 25, 2019

I'd be great if this keeps some certain of back compatibility. For example, if the module is renamed to ckb, could we have an alias (or example) to map core to ckb so existing codebase using JavaScript SDK could just update one line to upgrade?

@Keith-CY
Copy link
Member Author

Keith-CY commented Nov 25, 2019

I'd be great if this keeps some certain of back compatibility. For example, if the module is renamed to ckb, could we have an alias (or example) to map core to ckb so existing codebase using JavaScript SDK could just update one line to upgrade?

In fact, the name Core is defined by user in the following ways:

import Core from '@nervosnetwork/ckb-sdk-core'
const { default: Core } = require('@nervosnetwork/ckb-sdk-core')
const Core = require('@nervosnetwork/ckb-sdk-core').default

They can use any name they like:

import CKB from '@nervosnetwork/ckb-sdk-core'
const { default: CKB } = require('@nervosnetwork/ckb-sdk-core')
const CKB = require('@nervosnetwork/ckb-sdk-core').default

This issue only reminds me of renaming the class name from Core to CKB, while it's the default export, this update doesn't have any effects on usage.

@Keith-CY
Copy link
Member Author

Keith-CY commented Dec 8, 2019

#407

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants