> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Function: some()

> **some**\<`T`>(`value`): [`Option`](/api/types/Option.Option.md)\<`NonNullable`\<`T`>>

Creates a [Some](/api/types/Option.Some.md) from a given value.
Passing `null` or `undefined` returns [None](/api/types/Option.None.md) instead.

## Type Parameters

### T

`T`

The type of the value to wrap.

## Parameters

### value

`T`

## Returns

[`Option`](/api/types/Option.Option.md)\<`NonNullable`\<`T`>>

A [Some](/api/types/Option.Some.md) containing the value, or [None](/api/types/Option.None.md) if the value is nullish.

## Example

```ts
import { Option } from 'byenull';

const some = Option.some(42);
// { type: 'Some', value: 42 }

const none = Option.some(null);
// { type: 'None' }
```
