@shankarkharel/profanity-lang-ne 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ import { LanguagePack } from '@shankarkharel/profanity-core';
2
+
3
+ declare const ne: LanguagePack;
4
+
5
+ export { ne as default, ne };
@@ -0,0 +1,5 @@
1
+ import { LanguagePack } from '@shankarkharel/profanity-core';
2
+
3
+ declare const ne: LanguagePack;
4
+
5
+ export { ne as default, ne };
package/dist/index.js ADDED
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ default: () => index_default,
24
+ ne: () => ne
25
+ });
26
+ module.exports = __toCommonJS(index_exports);
27
+
28
+ // src/ne.ts
29
+ var NE_WORDS = [
30
+ "\u092E\u0942\u0930\u094D\u0916",
31
+ "\u092C\u0947\u0935\u0915\u0942\u092B",
32
+ "\u0939\u0930\u093E\u092E\u0940",
33
+ "\u0917\u0927\u093E",
34
+ "\u0915\u0941\u0915\u0941\u0930",
35
+ "\u091A\u0942\u0924\u093F\u092F\u093E",
36
+ "\u091D\u0942\u0920\u094B",
37
+ "\u0920\u0917",
38
+ "\u0928\u0902\u0917\u093E",
39
+ "\u0927\u094B\u0915\u093E",
40
+ "\u092D\u094B\u0915\u093E\u0932\u0940",
41
+ "\u091D\u0928\u094D\u0921\u0940",
42
+ "\u0916\u0930\u093E\u092C",
43
+ "\u0928\u0936\u093F\u0932\u093E",
44
+ "\u0928\u0936\u093E",
45
+ "\u0938\u093E\u0932\u093E"
46
+ ];
47
+
48
+ // src/index.ts
49
+ var OVERRIDES = {
50
+ // Example:
51
+ // "चूतिया": { severity: 4, category: ["sexual"] },
52
+ };
53
+ function normalizeTerm(s) {
54
+ return s.trim();
55
+ }
56
+ function uniq(arr) {
57
+ return Array.from(new Set(arr));
58
+ }
59
+ function toTermEntries(words) {
60
+ const normalized = uniq(words.map(normalizeTerm)).filter(Boolean);
61
+ return normalized.map((w) => {
62
+ const base = {
63
+ term: w,
64
+ severity: 3,
65
+ category: ["general"],
66
+ match: w.includes(" ") ? "phrase" : "word"
67
+ };
68
+ return OVERRIDES[w] ? { ...base, ...OVERRIDES[w] } : base;
69
+ });
70
+ }
71
+ var ne = {
72
+ code: "ne",
73
+ version: "0.1.0",
74
+ allowlist: ["assistant", "class"],
75
+ terms: toTermEntries(NE_WORDS)
76
+ };
77
+ var index_default = ne;
78
+ // Annotate the CommonJS export names for ESM import in node:
79
+ 0 && (module.exports = {
80
+ ne
81
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,54 @@
1
+ // src/ne.ts
2
+ var NE_WORDS = [
3
+ "\u092E\u0942\u0930\u094D\u0916",
4
+ "\u092C\u0947\u0935\u0915\u0942\u092B",
5
+ "\u0939\u0930\u093E\u092E\u0940",
6
+ "\u0917\u0927\u093E",
7
+ "\u0915\u0941\u0915\u0941\u0930",
8
+ "\u091A\u0942\u0924\u093F\u092F\u093E",
9
+ "\u091D\u0942\u0920\u094B",
10
+ "\u0920\u0917",
11
+ "\u0928\u0902\u0917\u093E",
12
+ "\u0927\u094B\u0915\u093E",
13
+ "\u092D\u094B\u0915\u093E\u0932\u0940",
14
+ "\u091D\u0928\u094D\u0921\u0940",
15
+ "\u0916\u0930\u093E\u092C",
16
+ "\u0928\u0936\u093F\u0932\u093E",
17
+ "\u0928\u0936\u093E",
18
+ "\u0938\u093E\u0932\u093E"
19
+ ];
20
+
21
+ // src/index.ts
22
+ var OVERRIDES = {
23
+ // Example:
24
+ // "चूतिया": { severity: 4, category: ["sexual"] },
25
+ };
26
+ function normalizeTerm(s) {
27
+ return s.trim();
28
+ }
29
+ function uniq(arr) {
30
+ return Array.from(new Set(arr));
31
+ }
32
+ function toTermEntries(words) {
33
+ const normalized = uniq(words.map(normalizeTerm)).filter(Boolean);
34
+ return normalized.map((w) => {
35
+ const base = {
36
+ term: w,
37
+ severity: 3,
38
+ category: ["general"],
39
+ match: w.includes(" ") ? "phrase" : "word"
40
+ };
41
+ return OVERRIDES[w] ? { ...base, ...OVERRIDES[w] } : base;
42
+ });
43
+ }
44
+ var ne = {
45
+ code: "ne",
46
+ version: "0.1.0",
47
+ allowlist: ["assistant", "class"],
48
+ terms: toTermEntries(NE_WORDS)
49
+ };
50
+ var index_default = ne;
51
+ export {
52
+ index_default as default,
53
+ ne
54
+ };
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@shankarkharel/profanity-lang-ne",
3
+ "version": "1.0.0",
4
+ "main": "dist/index.cjs",
5
+ "module": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "README.md",
17
+ "LICENSE"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsup src/index.ts --format cjs,esm --dts --clean",
21
+ "test": "echo \"no tests\"",
22
+ "lint": "echo \"(add eslint later)\""
23
+ },
24
+ "dependencies": {
25
+ "@shankarkharel/profanity-core": "1.0.0"
26
+ },
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "license": "MIT"
31
+ }