open-index/open-npm huggingface dataset:
npm package: @sctg/code-stats
Description: Count line of codes and display stats
Author: Ronan LE MEILLAT
Latest version: 0.1.4

# Simple tool for counting lines of code in project
This utility is developped for internal use.  
Feel free to use it but there is strictly no support.  

## basic Promise usage
```ts
import { LineCount,GlobalResults } from "@sctg/code-stats";
LineCount.countLines("src").then((results: GlobalResults) => {
  console.log(results);
});
```
multiple directories
```ts
import { LineCount,GlobalResults } from "@sctg/code-stats";
LineCount.countLines(["dirA","dirB"]).then((results: GlobalResults) => {
  console.log(results);
});
## basic Callback usage
```ts
    const onComplete = (count:GlobalResults)=>{
        console.log(count)
    }
    LineCount.countLinesCb("src",onComplete);
```
multiple directories
```ts
    const onComplete = (count:GlobalResults)=>{
        console.log(count)
    }
    LineCount.countLinesCb(["dirA","dirB"],onComplete);
```

## static stats usage
```ts
import {LineCount} from "@sctg/code-stats"

const results = await LineCount.countLines(['src','functions'])
fs.writeFile(
  "./src/config/codeStats.json",
  JSON.stringify(results),
  "utf8",
  function (err) {
    if (err) return console.log(err);
  }
);
```
sample output
```json
{
    "undefined": {
        "files": 53,
        "lines": null,
        "codeLines": null
    },
    "Vue": {
        "files": 61,
        "lines": 6839,
        "codeLines": 6532
    },
    "Stylesheets": {
        "files": 14,
        "lines": 189,
        "codeLines": 155
    },
    "Typescript": {
        "files": 34,
        "lines": 3369,
        "codeLines": 2957
    },
    "Json": {
        "files": 26,
        "lines": 1532,
        "codeLines": 1531
    }
}
```
## license
Without any form of… Provide as-is… 
Under MIT License.
npm package: @sctg/lazy-vue
Description: Lazy utilities for vue3.
Author: Ronan Le Meillat
Latest version: 1.0.3

# Lazy utilities for Vue3
This utility is developped for internal use.  
Feel free to use it but there is strictly no support.  
It uses TailwindCss classes.

## LazyObserver
it loads a component while the user scrolls on it
```html
<template>
    <lazy-observer :id="index" @on-change="onlazyMeteo">
        <some-custom-vue-sfc />
    </lazy-observer>
</template>
<script setup lang="ts">
import {LazyObserver} from "@sctg/lazy-vue";
</script>
```
## LazyImg
it loads a component while the user scrolls on it
```html
<template>
    <lazy-img class="mx-auto w-8 h-8" src="https://someurl/img.jpg"
                alt="Alt text" />
</template>
<script setup lang="ts">
import {LazyImg} from "@sctg/lazy-vue";
</script>
```

## CssLightbox
this is a no script pure css lightbox
it needs to create zIndex: 999 in tailwindConfig
```html
<template>
    <css-lightbox class="absolute block left-0 top-O w-full h-full"
            src="https://someurl/img.jpg"
            full-screen-src="https://someurl/img-full-res.jpg"
            :lazy="true"
            />
</template>
<script setup lang="ts">
import {CssLightbox} from "@sctg/lazy-vue";
import '@sctg/lazy-vue/dist/index.css'
</script>

```
npm package: @sctg/nocors-azure
Description: Minimalist noCors proxy for servless app
Author: Ronan LE Meillat
Latest version: 0.9.16

# Simplest noCors proxy for Serverless(Azure/Cloudflare) Web App

This is a very minimalistic proxy for enabling CORS on non CORS enabled sites.  

## For Azure Static Web Apps  
# npm package
https://www.npmjs.com/package/@sctg/nocors-pages  
You must use it in the /api/package.json file, there is no need to modify the main package.json  

# demo
[Source code](https://github.com/highcanfly-club/nocors/tree/main).   
https://nocors.kiik.cf/api/proxy?url=https://www.example.org
# usage
Create a new api entry with VSCode Azure tools or manually.  
```sh
cd api
npm i --save @sctg/nocors-azure
npm i --save got
npm i --save @azure/functions
```
In the index.ts of the new api route
```ts
import {
  AzureFunction,
  Context,
  HttpRequest,
} from "@azure/functions";
import { proxyAzureRequest } from "@sctg/nocors-azure";
const WHITELIST_REGEX=".*" // DANGEROUS TAKE CARE OF THE WHITELIST

const httpTrigger: AzureFunction = async function (
  context: Context,
  req: HttpRequest
): Promise<void> {
  const proxiedRequest = await proxyAzureRequest(WHITELIST_REGEX, req);
  context.res = {
    status: proxiedRequest.status,
    body: proxiedRequest.body,
    headers: proxiedRequest.headers,
  };
};

export default httpTrigger;
```
Now you can proxy your API requests to non CORS enabled site via:  
https://YOURSITE.TLD/api/proxy?url=https://NOCORS.WEBSITE/…/API/…/ . 
Be extremely attentive to the WHITELIST_REGEX const as it can opens your proxy to anyone  
Prefer something like
```js
const WHITELIST_REGEX="https://NOCORS.WEBSITE/.*"
```

## For Coudflare Pages 
# npm package
https://www.npmjs.com/package/@sctg/nocors-pages   

# demo
[Source code](https://github.com/highcanfly-club/nocors-cf).   
https://nocors.pages.dev/proxy?url=https://www.example.org  
check the header Via:noCors-for-serverless v…

# usage
```sh
npm i --save @sctg/nocors-pages
npm i -D --save @cloudflare/workers-types
```
create a /functions/proxy.ts file
```ts
import {proxyPagesRequest} from "@sctg/nocors-pages"
const WHITELIST_REGEX=".*"  // DANGEROUS TAKE CARE OF THE WHITELIST
export const onRequest: PagesFunction = async (context) => {
  return proxyPagesRequest(context,whitelistConf.regex)
};
```
Now you can proxy your API requests to non CORS enabled site via:  
https://YOURSITE.TLD/proxy?url=https://NOCORS.WEBSITE/…/API/…/  
Be extremely attentive to the WHITELIST_REGEX const as it can opens your proxy to anyone  
Prefer something like
```js
const WHITELIST_REGEX="https://NOCORS.WEBSITE/.*"
```
npm package: @sctg/nocors-pages
Description: Minimalist noCors proxy for servless app
Author: Ronan LE Meillat
Latest version: 0.9.16

# Simplest noCors proxy for Serverless(Azure/Cloudflare) Web App

This is a very minimalistic proxy for enabling CORS on non CORS enabled sites.  

## For Azure Static Web Apps  
# npm package
https://www.npmjs.com/package/@sctg/nocors-pages  
You must use it in the /api/package.json file, there is no need to modify the main package.json  

# demo
[Source code](https://github.com/highcanfly-club/nocors/tree/main).   
https://nocors.kiik.cf/api/proxy?url=https://www.example.org
# usage
Create a new api entry with VSCode Azure tools or manually.  
```sh
cd api
npm i --save @sctg/nocors-azure
npm i --save got
npm i --save @azure/functions
```
In the index.ts of the new api route
```ts
import {
  AzureFunction,
  Context,
  HttpRequest,
} from "@azure/functions";
import { proxyAzureRequest } from "@sctg/nocors-azure";
const WHITELIST_REGEX=".*" // DANGEROUS TAKE CARE OF THE WHITELIST

const httpTrigger: AzureFunction = async function (
  context: Context,
  req: HttpRequest
): Promise<void> {
  const proxiedRequest = await proxyAzureRequest(WHITELIST_REGEX, req);
  context.res = {
    status: proxiedRequest.status,
    body: proxiedRequest.body,
    headers: proxiedRequest.headers,
  };
};

export default httpTrigger;
```
Now you can proxy your API requests to non CORS enabled site via:  
https://YOURSITE.TLD/api/proxy?url=https://NOCORS.WEBSITE/…/API/…/ . 
Be extremely attentive to the WHITELIST_REGEX const as it can opens your proxy to anyone  
Prefer something like
```js
const WHITELIST_REGEX="https://NOCORS.WEBSITE/.*"
```

## For Coudflare Pages 
# npm package
https://www.npmjs.com/package/@sctg/nocors-pages   

# demo
[Source code](https://github.com/highcanfly-club/nocors-cf).   
https://nocors.pages.dev/proxy?url=https://www.example.org  
check the header Via:noCors-for-serverless v…

# usage
```sh
npm i --save @sctg/nocors-pages
npm i -D --save @cloudflare/workers-types
```
create a /functions/proxy.ts file
```ts
import {proxyPagesRequest} from "@sctg/nocors-pages"
const WHITELIST_REGEX=".*"  // DANGEROUS TAKE CARE OF THE WHITELIST
export const onRequest: PagesFunction = async (context) => {
  return proxyPagesRequest(context,whitelistConf.regex)
};
```
Now you can proxy your API requests to non CORS enabled site via:  
https://YOURSITE.TLD/proxy?url=https://NOCORS.WEBSITE/…/API/…/  
Be extremely attentive to the WHITELIST_REGEX const as it can opens your proxy to anyone  
Prefer something like
```js
const WHITELIST_REGEX="https://NOCORS.WEBSITE/.*"
```