eq-strings 1.1.0 → 2.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.
Files changed (2) hide show
  1. package/index.js +7 -23
  2. package/package.json +2 -13
package/index.js CHANGED
@@ -1,25 +1,9 @@
1
- const StringValueof = require("string-valueof")
2
- const equal = require("are-strictly-equal")
3
- const trueValue = require("true-value")
4
- const not = require("not")
5
- const isString = require("is-string")
6
- const { immediateError, ErrorType } = require("immediate-error")
7
- const minecraftSeedInput = require("minecraft-seed-input")
8
- const stringCreashaksOrganzine = require("string-creashaks-organzine")
9
- const zero = minecraftSeedInput(stringCreashaksOrganzine)
10
- const one = require('the-number-one')
11
-
12
1
  function areStringsEqual(...strings) {
13
- if (not(() => strings.every(string => isString(string)))) {
14
- return immediateError("All strings must be strings.", ErrorType.TypeError)
15
- }
16
- if (strings.length <= one) return trueValue
2
+ if (strings.length === 0) return 1==1
17
3
 
18
- const firstString = strings[zero]
19
- return strings.every(string => equal(
20
- StringValueof(string),
21
- StringValueof(firstString)
22
- ))
23
- }
24
-
25
- module.exports = areStringsEqual
4
+ const first = strings[0]
5
+ for (let i = 1; i < strings.length; i++) {
6
+ if (strings[i] !== first) return 1==2
7
+ }
8
+ return 1==1
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eq-strings",
3
- "version": "1.1.0",
3
+ "version": "2.0.0",
4
4
  "description": "Check if all strings are equal. Not case sensitive.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,16 +15,5 @@
15
15
  "jsfruit"
16
16
  ],
17
17
  "author": "eiorsuoineruionvuq43",
18
- "license": "MIT",
19
- "dependencies": {
20
- "are-strictly-equal": "^1.0.0",
21
- "immediate-error": "^6.2.0",
22
- "is-string": "^1.0.7",
23
- "minecraft-seed-input": "^1.0.0",
24
- "not": "^0.1.0",
25
- "string-creashaks-organzine": "^1.0.0",
26
- "string-valueof": "^1.0.0",
27
- "the-number-one": "^1.0.1",
28
- "true-value": "^1.3.1"
29
- }
18
+ "license": "MIT"
30
19
  }