@clusterprotocol/dataset
v1.0.1
Published
Official node package by ClusterProtocol to user Dataset API
Downloads
6
Readme
@clusterprotocol/dataset
A Node.js TypeScript package for cloning dataset repositories from ClusterProcotol .
Installation
npm install @clusterprotocol/dataset
Usage
import Dataset from '@clusterprotocol/dataset';
const dataset = new Dataset();
try {
dataset.get('ucirvine/sms_spam');
console.log('Repository cloned successfully!');
} catch (error) {
console.error('Error:', error.message);
}
API
Dataset
class
The main class for interacting with the Git Repo Cloner.
get(namespace: string): void
Clones a Git repository based on the provided namespace.
namespace
: A string in the format"organization/repository"
.- Throws an error if the namespace format is invalid or if there's an issue with cloning the repository.
Requirements
- Node.js (version 12 or higher recommended)
- Git must be installed on the system and accessible via the command line.
Error Handling
The package throws errors in the following cases:
- Git is not installed on the system.
- The provided namespace format is invalid.
- The repository cannot be cloned (e.g., repository doesn't exist, network issues, etc.).
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the ISC License.