open-index/open-npm huggingface dataset:
npm package: @stead08/optres
Description: A library for optimizing error or undefined handling in JavaScript and TypeScript using Rust-like Result and Option types.
Author: Stead08
Latest version: 0.1.6

# OPT-RES
Error handling like rust in typescript

# Description
This library provides a way to handle errors like rust in typescript.  
There is a npm package with the same name, but I decided on the name of the package without knowing it existed. sorry!

I referenced these in the implementation of the library:
- 【TypeScript】Result型を定義してエラーハンドリングを楽にする
https://zenn.dev/junki555/articles/4ab67fc78ce64c
- Option in std::option - Rust  
https://doc.rust-lang.org/std/option/enum.Option.html
- Result in std::result - Rust  
  https://doc.rust-lang.org/std/result/enum.Result.html
## Usage
```typescript
import {fetchWithResult, Optional, Result} from "@stead08/optres";

// divide function returns Optional<number>
function divide (a: number, b: number): Optional<number> {
    if (b === 0) {
        return Optional.none();
    }
    return Optional.some(a / b);
}

function test_divide_by_zero () {
    const result = divide(1, 0);
    result.when({
        some: (value) => console.log(value),
        none: () => console.log('error')
    });
}
test_divide_by_zero(); // error

// Using Optional<T> is useful when you want to return a value that may be null or undefined.
// you can assure that the value is not null or undefined by using Optional<T> with unwrap() method.
// Example:
const optional: Optional<number> = Optional.some(123);
const result: number = optional.unwrap();

// using when() method is useful when you want to handle both some and none cases.
// Example:
const optional2: Optional<number> = Optional.some(123);
const result2: number = optional2.when({
    some: (value) => value + 1,
    none: () => 0,
});

// you can also use Result<T, E> instead of Optional<T> for better error handling.
// Result<T, E> is a type that represents either success (Ok) or failure (Err).
// Result<T, E> is often used for error handling.
// Example:
function divide_returns_result (a: number, b: number): Result<number, Error> {
    if (b === 0) {
        return Result.err(new Error('divide by zero'));
    }
    return Result.ok(a / b);
}

function test_divide_by_zero_returns_result () {
    const result = divide_returns_result(1, 0);
    result.when({
        ok: (value) => console.log(value),
        err: (err) => console.log(err)
    });
}

test_divide_by_zero_returns_result(); // Error: divide by zero

// fetchWithResult returns Result<Response, Error>
async function fetchWithResultExample () {
    const response = await fetchWithResult(new URL('https://www.google.com'));
    const result = response.ok();
    console.log(result);
}
```
npm package: @steadev/react-native-kakao-sdk
Description: React Native Module for Kakao SDK (forked from @react-native-seoul/kakao-login@4.2.3)
Author: dooboolab
Latest version: 1.2.1

# @steadev/react-native-kakao-sdk

---

forked from [@react-native-seoul/kakao-login@4.2.3](https://www.npmjs.com/package/@react-native-seoul/kakao-login)

Supports `Kakao Sync`, `Kakao link`, `loginWithNewScopes`(추가항목 동의받기)

Android Kakao SDK version: 2.11.0<br />
iOS Kakao SDK version: 2.11.1<br />

## Archive Error

`Undefined symbol: _OBJC_CLASS_$_RNKakaoLogins`<br />
When this error occurs, paste below codes to root project's Podfile <br />

```
pre_install do |installer|
  Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}

  installer.pod_targets.each do |pod|
    if pod.name.start_with?('react-native-kakao-sdk')
      def pod.build_type;
        Pod::BuildType.static_library # get kakao_login static approach instead of dynamic one because of use_frameworks!
      end
    end
  end
end
```

## Added / Edited Functions

- `initializeKakao()`
- `login(serviceTerms)`
- `loginWithNewScopes(scopes)`
- `sendLinkFeed(params)`

<br />

### initializeKakao(): Promise<KakaoOAuthTokenStatusInfo>

---

It returns `KakaoStatus` which notice kakao token status.<br />

<b>Return</b>

```typescript
{
  status: KakaoStatus;
}

enum KakaoStatus {
  LOGIN_NEEDED = 'LOGIN_NEEDED',
  ERROR = 'ERROR',
  SUCCEED = 'SUCCEED',
}
```

### login(serviceTerms?: string[]): Promise<KakaoOAuthToken>

---

Kakao sync를 지원합니다.<br />
최초의 kakao sync는 기존 login함수로도 동작하지만,<br />
이미 kakao sync로 가입한 유저는 serviceTerm이 수정되거나 추가되어도 그냥 로그인 되버립니다.<br />
이 경우 serviceTerms를 파라미터로 넘기면 해당 terms에 대해 동의 받을 수 있습니다.<br />

<br />

### loginWithNewScopes(scopes: [string]): Promise<KakaoOAuthToken>

---

추가로 동의받아야 할 항목을 동의받을 수 있습니다.<br />
ex) 'friends' 권한이 추가되었을 경우 아래처럼 사용하면 됩니다.

`await loginWithNewScopes(['friends'])`

<br />

### sendLinkFeed(params: KakaoLinkParams): Promise<void>

---

카카오 링크를 보냅니다 (공유하기)

<b>Parameter</b>

```typescript
{
  title: string;
  description: string;
  imageUrl: string;
  imageLinkUrl: string;
  buttonTitle: string;
  imageWidth?: number;
  imageHeight?: number;
}
```
npm package: @steadfast-devs/indexeddb
Description: This library will be used by members of steadfast developers but if you find it and help you feel you free to use it.
Author: nathanielyork.dev@gmail.com
Latest version: 2.0.0-alpha.1.1.1

# Indexeddb
This library was created only to be used by members of 'steadfast developers', but if you find it and it helps you feel free to use it.

## Installation
```bash
npm install @steadfast-devs/indexeddb
```

## Usage
First you need to create a .schema file, this will describe the collection structure.
For example:
```javascript
//users.schema
import {Schema} from '@steadfast-devs/indexeddb';
export const UserSchema: Schema = {
  primaryKey: 'username',
  properties: {
    id: { type: 'string'},
    username: { type: 'string', primary: true },
    password: { type: 'string' },
  },
  required: ['username', 'password'],
};
```
Then you need to register the collections
```javascript
import { IndexedDataBase } from '@steadfast-devs/indexeddb';

// You need use the static method registerCollection 
IndexedDataBase.registerCollection('users', UserSchema);

// Then you can instantiate the IndexedDataBase class. You need to pass the database name and the version
const db = new IndexedDataBase('myDatabase', 1);
```

Now you can use the database
```javascript
//Create a new user
db.addData('users', {
    id: '1',
    username: 'myUsername', 
    password: 'myPassword'
});

//Get all users
db.getAllData('users').then(users => {
    console.log(users);
});

//Get a user by username
db.getData('users', 'myUsername').then(user => {
    console.log(user);
});
```

## Example Angular Service
```javascript
...
import { IndexedDataBase } from '@steadfast-devs/indexeddb';
import { UserSchema } from './user.schema';
@Injectable({
  providedIn: 'root'
})
export class dbServices{
    public instance: IndexedDataBase;
    constructor(){
        ...
        IndexedDataBase.registerCollection('users', UserSchema);
        ...
        this.instance = new IndexedDataBase('myDatabase', 1);
    }
}
```

## Version Notes
### 1.0.0-alpha.1.0.0 to 2.0.0-alpha.1.1.0
- Some methods were changed to be more intuitive
### example:
```javascript
// Before
// First we need to instantiate the database
import { IndexedDataBase } from '@steadfast-devs/indexeddb';
const db = new IndexedDataBase('myDatabase', 1);
// Then we need to create the collection
db.createCollection('users', UserSchema);

// After
// We need to register the collection first
import { IndexedDataBase } from '@steadfast-devs/indexeddb';
IndexedDataBase.registerCollection('users', UserSchema);
IndexedDataBase.registerCollection('task', TaskSchema);
...
// Then we can instantiate the database
const db = new IndexedDataBase('myDatabase', 1);
```