open-index/open-npm huggingface dataset:
npm package: @newtonry/react-native-mock
Description: A fully mocked and test-friendly version of react native
Author: Jake Howard
Latest version: 0.3.4

# react-native-mock [![Build Status](https://travis-ci.org/RealOrangeOne/react-native-mock.svg?branch=master)](https://travis-ci.org/RealOrangeOne/react-native-mock)

[![Join the chat at https://gitter.im/RealOrangeOne/react-native-mock](https://badges.gitter.im/RealOrangeOne/react-native-mock.svg)](https://gitter.im/RealOrangeOne/react-native-mock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
A fully mocked and test-friendly version of react native

## Requirements
- Node.js 4+
- The latest version of react-native

__Note__: This library is designed to work with the most recent version of react-native. If you aren't using the most recent version, you will need to download an older version of this library, as the API is likely to be different, and the dependencies are likely to break.

## How Am I Supposed To Use This?

```bash
npm i react-native-mock --save-dev
```

```js
/* file-that-runs-before-all-of-my-tests.js */

// This will mutate `react-native`'s require cache with `react-native-mock`'s.
require('react-native-mock/mock'); // <-- side-effects!!!
```

## Why?

Testing React Native components is *hard*.  I'm hoping this makes it easier.

I wrote a React Testing Library that works really well for React "Web", but didn't really work for React "Native" without something like this.


## Wait... Is this actually a terrible idea?

I don't know. Maybe.

I'd love to figure that out though... feel free to file an issue if you have opinions.


## Contributing
Discovered a bug, got a new feature, or found something that needs improving? __Submit a PR!__

Make sure to read through the CONTRIBUTING.md file before submitting your PR!

### Core Contributors
- [Jake Howard](https://github.com/RealOrangeOne)
- [Leland Richardson](https://github.com/lelandrichardson) (Original Creator)

## What do the labels mean?
See [this wiki page](https://github.com/RealOrangeOne/react-native-mock/wiki/Labels---What-do-they-mean%3F).
npm package: @newtonsander/util
Description: Node.js's util module for all engines
Author: Joyent
Latest version: 0.12.4

# util [![Build Status](https://travis-ci.org/browserify/node-util.png?branch=master)](https://travis-ci.org/browserify/node-util)

> Node.js's [util][util] module for all engines.

This implements the Node.js [`util`][util] module for environments that do not have it, like browsers.

## Install

You usually do not have to install `util` yourself. If your code runs in Node.js, `util` is built in. If your code runs in the browser, bundlers like [browserify](https://github.com/browserify/browserify) or [webpack](https://github.com/webpack/webpack) (up to version 4 -- [see this documentation](https://webpack.js.org/configuration/resolve/#resolvefallback) for how to include polyfills like `util` in webpack 5+) also include the `util` module.

But if none of those apply, with npm do:

```shell
npm install util
```

## Usage

```javascript
var util = require('util')
var EventEmitter = require('events')

function MyClass() { EventEmitter.call(this) }
util.inherits(MyClass, EventEmitter)
```

## Browser Support

The `util` module uses ES5 features. If you need to support very old browsers like IE8, use a shim like [`es5-shim`](https://www.npmjs.com/package/es5-shim). You need both the shim and the sham versions of `es5-shim`.

To use `util.promisify` and `util.callbackify`, Promises must already be available. If you need to support browsers like IE11 that do not support Promises, use a shim. [es6-promise](https://github.com/stefanpenner/es6-promise) is a popular one but there are many others available on npm.

## API

See the [Node.js util docs][util].  `util` currently supports the Node 8 LTS API. However, some of the methods are outdated. The `inspect` and `format` methods included in this module are a lot more simple and barebones than the ones in Node.js.

## Contributing

PRs are very welcome! The main way to contribute to `util` is by porting features, bugfixes and tests from Node.js. Ideally, code contributions to this module are copy-pasted from Node.js and transpiled to ES5, rather than reimplemented from scratch. Matching the Node.js code as closely as possible makes maintenance simpler when new changes land in Node.js.
This module intends to provide exactly the same API as Node.js, so features that are not available in the core `util` module will not be accepted. Feature requests should instead be directed at [nodejs/node](https://github.com/nodejs/node) and will be added to this module once they are implemented in Node.js.

If there is a difference in behaviour between Node.js's `util` module and this module, please open an issue!

## License

[MIT](./LICENSE)

[util]: https://nodejs.org/docs/latest-v8.x/api/util.html
npm package: @newtonschool/newton-mcp
Description: MCP server for Newton School — read-only student learning data
Latest version: 0.3.2

# @newtonschool/newton-mcp

Connect your AI assistant to your [Newton School](https://my.newtonschool.co) account. Ask about your courses, lectures, assignments, practice problems, and more — all read-only.

## Setup

### 1. Add to your AI assistant

Pick your client and copy-paste the config:

<details>
<summary><b>Claude Desktop</b></summary>

Add to your [Claude Desktop config](https://modelcontextprotocol.io/quickstart/user#2-add-the-entry-to-your-configuration):

```json
{
  "mcpServers": {
    "newton": {
      "command": "npx",
      "args": ["-y", "@newtonschool/newton-mcp@latest"]
    }
  }
}
```
</details>

<details>
<summary><b>Claude Code</b></summary>

```sh
claude mcp add newton -- npx -y @newtonschool/newton-mcp@latest
```
</details>

<details>
<summary><b>Cursor</b></summary>

Add to `.cursor/mcp.json` in your project or `~/.cursor/mcp.json` globally:

```json
{
  "mcpServers": {
    "newton": {
      "command": "npx",
      "args": ["-y", "@newtonschool/newton-mcp@latest"]
    }
  }
}
```
</details>

<details>
<summary><b>Codex</b></summary>

```sh
codex mcp add newton -- npx -y @newtonschool/newton-mcp@latest
```
</details>

### 2. Log in

Run this once in your terminal:

```sh
npx -y @newtonschool/newton-mcp@latest login
```

A browser window will open — enter the code shown in your terminal to connect your Newton School account.

### 3. Start asking

Restart your AI assistant, then try:

- "How am I doing?" — course overview, XP, rank
- "When is my next class?" — upcoming lectures and contests
- "What did I miss last week?" — recent lectures with recordings
- "Give me some array problems" — search practice questions by topic/difficulty
- "What assignments are due?" — deadlines and submission status
- "My DSA progress" — subject-level completion stats
- "Today's QOTD" — Question of the Day with streak info
- "Leaderboard" — class rankings

## Other commands

```sh
npx -y @newtonschool/newton-mcp@latest status   # Check auth status
npx -y @newtonschool/newton-mcp@latest logout   # Clear credentials
```

## Troubleshooting

**"Authentication required" error in chat?**
Run the login command above in your terminal, then retry.

**Want faster startup?**
Install globally with `npm install -g @newtonschool/newton-mcp`, then use `newton-mcp` directly instead of the `npx ...` commands.

## Requirements

- macOS (Apple Silicon)
- Node.js
- A Newton School student account

## Links

- [Newton School](https://my.newtonschool.co)
npm package: @newtral/class-validator
Description: Decorator based validation augmenting the class-validator module
Author: Lorens Leon
Latest version: 5.0.3

# @newtral/class-validator

## Install

```bash
npm install @newtral/class-validator class-validator
```

## Usage

### @IsOptional()

Validate when the original value is not undefined. Unlike the class-validator one that allows both
`null` and `undefined`

```typescript
import { IsString, validateSync } from 'class-validator';
import { IsOptional } from '@newtral/class-validator';

class User {
  @IsOptional()
  @IsString()
  name?: string;

  constructor(name?: string) {
    this.name = name;
  }
}

const errors = validateSync(new User());
console.log(errors.length); // 0
```

### @IsObjectId()

Validate the value is a valid object id. Could be numeric, string or another object id. It could
useful to pair with the
[ToObjectId](https://www.npmjs.com/package/@newtral/class-transformer#toobjectid) transformer in
order to always convert to an object id instance

```typescript
import { IsString, validateSync } from 'class-validator';
import { IsOptional } from '@newtral/class-validator';
import { ObjectId } from 'mongo';

class User {
  @IsObjectId()
  _id?: string | number | ObjectId;
}
```

## Development

The project use [husky](https://github.com/typicode/husky) and
[lint-staged](https://github.com/okonet/lint-staged) for linting and fixing possible errors on
source code before commit

Git hooks scripts are installed after running `npm install` the first time

### npm run build:commonjs

Compile typescript files from the `src` folder inside the `lib` folder

### npm run build:esm

Compile typescript files from the `src` folder inside the `esm` folder using es modules

### npm run build

Concurrently run both `build:commonjs` and `build:esm`

### npm run clean

Remove the following directories/files

- **lib**
- **esm**
- **reports**

### npm test

Run tests files inside the `tests` folder that matches the following patterns. Exit with code > 0 on
error

- **\*.test.ts**
- **\*.spec.ts**

### npm run cover

The same as `npm test` and generates coverages reports in `reports/coverage`. Exit with code > 0 on
error

### npm run lint

Check eslint errors according to `.eslintrc`

### npm run lint:fix

Run `npm run lint` applying fixes and run prettier on every typescript file

### npm run health

Check for:

- Build errors
- Tests failures
- Lint errors

### npm run ci

Run test and generate every possible report. Do not exit with error code > 0 if the tests fail. It
generates a report file instead

- **reports/lint-checkstyle.xml** Lint report in chackstyle format
- **reports/test-results.xml** Test report in xUnit format
- **reports/coverage/clover.xml** Coverage report in clover format
- **reports/coverage/cobertura-coverage.xml** Coverage report in cobertura format
- **reports/coverage/lcov.info** Coverage report in lcov
- **reports/coverage/index.html** Coverage report in html
npm package: @newtral/nestjs-configuration
Description: Dynamic configuration module for NestJS
Author: Lorens Leon
Latest version: 4.5.3

# @newtral/nestjs-configuration

## Usage

Assume you have the following `.env` file. The `.env` file is loaded into an object using the
[dotenv](https://www.npmjs.com/package/dotenv) package.

```txt
USER_EXTERNAL_ENDPOINT=https://api.exaple.com/users
```

```typescript
import { ConfigurationModule } from '@newtral/nestjs-configuration';
import { Injectable, Module } from '@nestjs/common';

// Define a valid JSON schema for your configuration object
const { InjectConfiguration, configurationModule } = ConfigurationModule.forEnvironment({
  type: 'object',
  properties: {
    USER_EXTERNAL_ENDPOINT: { type: 'string' }
  },
  required: ['USER_EXTERNAL_ENDPOINT']
});

@Injectable()
class UserService {
  constructor(@InjectConfiguration('USER_EXTERNAL_ENDPOINT') private readonly endpoint: string) {}
}

@Module({
  imports: [configurationModule],
  providers: [UserService]
})
class AppModule {}
```

### ConfigurationModule.forEnvironment(schema: JSONSchema7)

- **schema**: A valid JSON Schema v7

### InjectConfiguration(configurationKey?: string)

- When no `configurationKey` is provided the whole configuration object is injected
- When the `configurationKey` is provided the only the selected configuration key is injected

## Development

The project use [husky](https://github.com/typicode/husky) and
[lint-staged](https://github.com/okonet/lint-staged) for linting and fixing possible errors on
source code before commit

Git hooks scripts are installed after running `npm install` the first time

### npm run build:commonjs

Compile typescript files from the `src` folder inside the `lib` folder

### npm run build:esm

Compile typescript files from the `src` folder inside the `esm` folder using es modules

### npm run build

Concurrently run both `build:commonjs` and `build:esm`

### npm run clean

Remove the following directories/files

- **lib**
- **esm**
- **reports**

### npm test

Run tests files inside the `tests` folder that matches the following patterns. Exit with code > 0 on
error

- **\*.test.ts**
- **\*.spec.ts**

### npm run cover

The same as `npm test` and generates coverages reports in `reports/coverage`. Exit with code > 0 on
error

### npm run lint

Check eslint errors according to `.eslintrc`

### npm run lint:fix

Run `npm run lint` applying fixes and run prettier on every typescript file

### npm run health

Check for:

- Build errors
- Tests failures
- Lint errors

### npm run ci

Run test and generate every possible report. Do not exit with error code > 0 if the tests fail. It
generates a report file instead

- **reports/lint-checkstyle.xml** Lint report in chackstyle format
- **reports/test-results.xml** Test report in xUnit format
- **reports/coverage/clover.xml** Coverage report in clover format
- **reports/coverage/cobertura-coverage.xml** Coverage report in cobertura format
- **reports/coverage/lcov.info** Coverage report in lcov
- **reports/coverage/index.html** Coverage report in html
npm package: @newtral/nestjs-logger
Description: Logger module for the NestJS framework
Author: Lorens Leon
Latest version: 4.5.0

# @newtral/nestjs-logger

## Install

```bash
npm install @newtral/nestjs-logger
```

## Usage

Pino logger wrapper to be used in conjunction with NestJS

```typescript
import { LoggerModule, LoggerService } from '@newtral/nestjs-logger';
import { Injectable, Module, OnModuleInit } from '@nestjs/common';

@Injectable()
class AppService implements OnModuleInit {
  private readonly logger = this.loggerService.getLogger(module);

  constructor(private readonly loggerService: LoggerService) {}

  onModuleInit(): void {
    this.logger.info('app service ready!');
    this.logger.warn({ foo: 'bar' }, 'logging with metadata and formatters  %s', ':)');
  }
}

@Module({
  imports: [
    LoggerModule.forRoot({
      // Default log verbosity level for every logger
      // Can be overridden by the .getLogger() method
      logLevel: 'info',
      // Enable pretty print. The log format is json by default
      prettyPrint: true
    })
  ],
  providers: [AppService]
})
class AppModule {}
```

## Development

The project use [husky](https://github.com/typicode/husky) and
[lint-staged](https://github.com/okonet/lint-staged) for linting and fixing possible errors on
source code before commit

Git hooks scripts are installed after running `npm install` the first time

### npm run build:commonjs

Compile typescript files from the `src` folder inside the `lib` folder

### npm run build:esm

Compile typescript files from the `src` folder inside the `esm` folder using es modules

### npm run build

Concurrently run both `build:commonjs` and `build:esm`

### npm run clean

Remove the following directories/files

- **lib**
- **esm**
- **reports**

### npm test

Run tests files inside the `tests` folder that matches the following patterns. Exit with code > 0 on
error

- **\*.test.ts**
- **\*.spec.ts**

### npm run cover

The same as `npm test` and generates coverages reports in `reports/coverage`. Exit with code > 0 on
error

### npm run lint

Check eslint errors according to `.eslintrc`

### npm run lint:fix

Run `npm run lint` applying fixes and run prettier on every typescript file

### npm run health

Check for:

- Build errors
- Tests failures
- Lint errors

### npm run ci

Run test and generate every possible report. Do not exit with error code > 0 if the tests fail. It
generates a report file instead

- **reports/lint-checkstyle.xml** Lint report in chackstyle format
- **reports/test-results.xml** Test report in xUnit format
- **reports/coverage/clover.xml** Coverage report in clover format
- **reports/coverage/cobertura-coverage.xml** Coverage report in cobertura format
- **reports/coverage/lcov.info** Coverage report in lcov
- **reports/coverage/index.html** Coverage report in html

### npm run release

- Bump `package.json` version accordingly to the commit messages
- Generate changelog for the new version from the commit messages
- Commit `package.json` and `CHANGELOG.md` with the new changes
- Create a git tag with the new version
- You'll need to execute `git push --follow-tags origin master` after generating a release