open-index/open-npm huggingface dataset:
npm package: @parser-libs/apple-notes-jxa
Description: apple-notes-jxa
Author: Alex
Latest version: 1.4.3

Parser-Libs / Apple Note JXA
===================

Simple module to read, edit, and manage Apple Notes throught JXA (offline)

## Using this module in other modules

Here is a quick example of how this module can be used in other modules. The [TypeScript Module Resolution Logic](https://www.typescriptlang.org/docs/handbook/module-resolution.html) makes it quite easy. The file `src/index.ts` acts as an aggregator of all the functionality in this module. It imports from other files and re-exports to provide a unified interface for this module. The _package.json_ file contains `main` attribute that points to the generated `lib/index.js` file and `typings` attribute that points to the generated `lib/index.d.ts` file.



- To use in TypeScript file -

```ts
import * as Notes from "@parser-libs/apple-notes-jxa";

Notes.accounts()
  .then((accounts) => console.log(accounts));
```

- To use in a JavaScript file -

```js
const Notes = require('@parser-libs/apple-notes-jxa');

Notes.accounts()
  .then((accounts) => console.log(accounts));
```

## License

Source code is licensed under the [Apache Licence, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).

Copyright (c) 2022 Alex <alex@milyutin.work>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
npm package: @parseysharp/parseyscript
Description: TypeScript parsing library for turning less-structured data into typed values with path-aware errors.
Latest version: 1.0.2

# parseyscript

A small TypeScript parsing library for going from less-structured inputs to more-structured types, with cursor-based navigation and path-aware error reporting.

You can think of it as an alternative to Zod: instead of declaring the entire shape of the source data, you describe only the values you want to extract. You navigate someone else's structure on your own terms, without having to model every intermediate field just because it exists in the input.

It provides:

- **`Parse<A>`**: composable parsers for values of type `A` (strings, numbers, booleans, dates, etc.).
- **Cursor-based navigation** via `at` / `maybeAt` using a `Navigator` over arbitrary input shapes.
- **Optional values** via a simple `Maybe` type.
- **Result values** via `ParseResult`, with success/failure, mapping, and sequencing helpers.

## Installation

This is a plain TypeScript project. You can install dependencies with:

```bash
npm install
```

## Usage

The library is re-exported from `src/index.ts`, so you can import everything as:

```ts
import * as P from "./src";
```

Example: parsing a nested object with some required and optional fields:

```ts
const parser = P.Parse.zip4(
  P.Parse.string().maybeAt("some", ["nested", "path"]),
  P.Parse.dateTimeOffsetFlex({ epochIsMilliseconds: true }).at("some", [
    "other",
    "path",
  ]),
  P.Parse.bool().at("the", ["flag"]),
  P.Parse.floatFlex().at("the", ["number"])
).map(([a, b, c, d]) => ({ a, b, c, d }));

const input = {
  the: {
    number: 23,
    flag: "false",
  },
  some: {
    other: { path: "1762912054467" },
    nested: { path: "hello" },
  },
};

const result = parser.parse(P.Navigator.unknown(), P.Maybe.fromNullable(input));
console.log(result);
```

Errors are accumulated as `ParseError` values with human-readable messages and a dot-separated path.

## Running tests

Tests are written with Vitest and live in `tests/`.

```bash
npm test
```

This runs Vitest against the TypeScript sources.
npm package: @parseysharp/parseyscript-effect
Description: Pipeable Effect helpers for @parseysharp/parseyscript (Option / Either combinators).
Latest version: 1.1.0

# @parseysharp/parseyscript-effect

Effect-friendly helpers for [`@parseysharp/parseyscript`](https://www.npmjs.com/package/@parseysharp/parseyscript).

This package exports a small `ParseEffect` helper object that:

- **Lifts optional values** from `Maybe<A>` to `Option.Option<A>`.
- **Converts parse results** from `ParseResult<A, E>` to `Either.Either<A, E>`.
- Provides **pipeable combinators** that match the core library's pipeable style.

For details on `Parse`, `Navigator`, `Maybe`, and `ParseResult`, see the core ParseyScript README.

## Installation

Install the core library, this extension, and `effect`:

```bash
npm install @parseysharp/parseyscript @parseysharp/parseyscript-effect effect
```

`@parseysharp/parseyscript` and `effect` are peer dependencies of this package; your application should depend on them directly.

## What this package adds

The main export is a `ParseEffect` helper object composed of pipeable functions:

- **`ParseEffect.option`**

  ```ts
  ParseEffect.option: <A>(p: Parse<A>) => Parse<Option.Option<A>>
  ```

  Lifts a `Parse<A>` into `Parse<Option.Option<A>>` by delegating to `Parse.maybe` and converting the `Maybe` result into an `Option`.

- **`ParseEffect.optionAt(head, tail)`**

  ```ts
  ParseEffect.optionAt: (head: string | number, tail: (string | number)[]) =>
    <A>(p: Parse<A>) => Parse<Option.Option<A>>
  ```

  Like calling `p.maybeAt(head, tail)` and then mapping `Maybe<A>` to `Option.Option<A>`, but as a pipeable combinator.

- **`ParseEffect.parseEither(nav, x)`**

  ```ts
  ParseEffect.parseEither:
    <B>(nav: Navigator<B>, x: Maybe<B>) =>
    <A>(p: Parse<A>) => Either.Either<A, FmtParseError[]>
  ```

  Runs a `Parse<A>` and converts the `ParseResult<A, FmtParseError[]>` into an `Either` from `effect`.

All helpers are designed to be used with the pipeable `Parse` API in the core library.

## Basic usage

```ts
import * as P from "@parseysharp/parseyscript";
import { ParseEffect } from "@parseysharp/parseyscript-effect";

const parser = P.Parse.zip4(
  P.Parse.string().pipe(ParseEffect.optionAt("some", ["nested", "path"])),
  P.Parse.dateTimeOffsetFlex({ epochIsMilliseconds: true }).at("some", [
    "other",
    "path",
  ]),
  P.Parse.bool().at("the", ["flag"]),
  P.Parse.floatFlex().at("the", ["number"])
);

const input = {
  the: {
    number: 23,
    flag: "false",
  },
  some: {
    other: { path: "1762912054467" },
    nested: { path: "hello" },
  },
};

const result = parser.pipe(
  ParseEffect.parseEither(P.Navigator.unknown(), P.Maybe.fromNullable(input))
);
```

You can also use these helpers directly on smaller parsers and then compose with the rest of the fluent `Parse` API.