pronouny 0.1.1 → 0.1.2
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.
- package/README.md +15 -11
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -20,31 +20,35 @@ This class is intended to verify and retrieve correct pronouns. It is centered a
|
|
|
20
20
|
|
|
21
21
|
## Example
|
|
22
22
|
|
|
23
|
-
```
|
|
24
|
-
import { Pronouny } from
|
|
23
|
+
```ts
|
|
24
|
+
import { Pronouny } from "pronouny";
|
|
25
25
|
|
|
26
26
|
// Create a new instance of the Validate class
|
|
27
27
|
const pronounValidator = new Pronouny.Validate();
|
|
28
28
|
|
|
29
29
|
// Create a new Pronoun object for ze/hir pronouns
|
|
30
|
-
const pronounZe = new Pronouny.Pronoun(
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
const pronounZe = new Pronouny.Pronoun({
|
|
31
|
+
subject: "ze",
|
|
32
|
+
object: "hir",
|
|
33
|
+
possessiveAdjective: "hir",
|
|
34
|
+
possessivePronoun: "hirs",
|
|
35
|
+
reflexive: "hirself",
|
|
36
|
+
});
|
|
33
37
|
|
|
34
38
|
// Add the pronoun to the pronounSet map
|
|
35
|
-
pronounValidator.extend(
|
|
39
|
+
pronounValidator.extend("ze", pronounZe);
|
|
36
40
|
|
|
37
41
|
// Set someone's pronouns.
|
|
38
42
|
const vayne = {
|
|
39
43
|
username: vaynegarden,
|
|
40
|
-
pronouns: pronounValidator.createSetFrom(
|
|
41
|
-
}
|
|
44
|
+
pronouns: pronounValidator.createSetFrom("she/ze/they"),
|
|
45
|
+
};
|
|
42
46
|
|
|
43
47
|
// Resolve the pronouns in your app
|
|
44
|
-
console.log(
|
|
45
|
-
|
|
48
|
+
console.log(
|
|
49
|
+
vayne.username + " updated " + vayne.pronouns.use("psAdj") + " status."
|
|
50
|
+
);
|
|
46
51
|
// Returns "vaynegarden updated her status", "vaynegarden
|
|
47
52
|
// updated hir status", or "vaynegarden updated their status",
|
|
48
53
|
// selected randomly among the three.
|
|
49
|
-
|
|
50
54
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pronouny",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "a small, typed utility library to determine the correct pronoun from a string and several utility functions.",
|
|
5
5
|
"main": "./lib/cjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -24,5 +24,10 @@
|
|
|
24
24
|
"text",
|
|
25
25
|
"grammar",
|
|
26
26
|
"gender"
|
|
27
|
-
]
|
|
27
|
+
],
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/vaynealtapascine/pronouny"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://github.com/vaynealtapascine/pronouny"
|
|
28
33
|
}
|