{"_id":"@ap.cx/unicode-range","_rev":"6-49ea526c43fde0182287414e294b8f34","name":"@ap.cx/unicode-range","dist-tags":{"latest":"1.4.0"},"versions":{"1.0.0":{"name":"@ap.cx/unicode-range","version":"1.0.0","description":"`@ap.cx/unicode-range` is a collection of utility functions for generating and manipulating Unicode values.","source":"src/index.ts","main":"dist/main.js","module":"dist/module.js","scripts":{"watch":"parcel watch","build":"parcel build","test":"jest"},"author":"","license":"ISC","devDependencies":{"@types/jest":"^29.5.3","jest":"^29.6.2","parcel":"^2.9.3","ts-jest":"^29.1.1"},"_id":"@ap.cx/unicode-range@1.0.0","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-jI7OYx2Am1gRcg12vhawHxAJBsYBJRRh7sYDMqzPyHizFW352inOy5NjUCRteD8oaxRpFEzTVjVwgq4LZf9gTQ==","shasum":"c1e173f7c70716abcb6094df3bbd73974d5b7819","tarball":"https://registry.npmjs.org/@ap.cx/unicode-range/-/unicode-range-1.0.0.tgz","fileCount":9,"unpackedSize":31580,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICcOG2ZJKhx8zulE5o9rYw55yjLzQ7t7KOeECO8d3gt1AiAAuIec2czgMZDWM0NDeq8lGQ3NUAJuJD9T5E9tO8OGsg=="}]},"_npmUser":{"name":"thierryc","email":"info@autreplanete.com"},"directories":{},"maintainers":[{"name":"thierryc","email":"info@autreplanete.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unicode-range_1.0.0_1691663623653_0.7590372560438183"},"_hasShrinkwrap":false},"1.0.1":{"name":"@ap.cx/unicode-range","version":"1.0.1","description":"`@ap.cx/unicode-range` is a collection of utility functions for generating and manipulating Unicode values.","source":"src/index.ts","main":"dist/main.js","module":"dist/module.js","scripts":{"watch":"parcel watch","build":"parcel build","test":"jest"},"author":"","license":"ISC","devDependencies":{"@types/jest":"^29.5.3","jest":"^29.6.2","parcel":"^2.9.3","ts-jest":"^29.1.1"},"gitHead":"be8b5df21b86368fad41f325306cff4f732c0201","_id":"@ap.cx/unicode-range@1.0.1","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-LDphFNAgEoqzpsYuDpVjEN4VE2aoCeqmHzBA3hE8EEQcgENM/7cz2DJC4hJ4ICgYdwe43DP9TgHQb1NJOBJAng==","shasum":"bb8e8f324d173599affbbb5a33fc784d04226c88","tarball":"https://registry.npmjs.org/@ap.cx/unicode-range/-/unicode-range-1.0.1.tgz","fileCount":9,"unpackedSize":31593,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAR25/Sw9E5YsZv5RVRAbcuNhoVsEQ9Fsk1hkpevSCDaAiAfXoZmzQ21oRpYKlsU42gvef62TYsL8hWCgexjAoCYRA=="}]},"_npmUser":{"name":"thierryc","email":"info@autreplanete.com"},"directories":{},"maintainers":[{"name":"thierryc","email":"info@autreplanete.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unicode-range_1.0.1_1691664434869_0.3203950524765393"},"_hasShrinkwrap":false},"1.0.2":{"name":"@ap.cx/unicode-range","version":"1.0.2","description":"`@ap.cx/unicode-range` is a collection of utility functions for generating and manipulating Unicode values.","source":"src/index.ts","main":"dist/main.js","module":"dist/module.js","scripts":{"watch":"parcel watch","build":"parcel build","specs":"jest --coverage","lint":"eslint --ext.ts src","test":"npm run build && npm run lint && npm run specs","prepublish":"npm test"},"author":"","license":"ISC","devDependencies":{"@types/jest":"^29.5.3","@typescript-eslint/eslint-plugin":"^6.3.0","@typescript-eslint/parser":"^6.3.0","eslint":"^8.46.0","jest":"^29.6.2","parcel":"^2.9.3","ts-jest":"^29.1.1"},"gitHead":"bb22669eae8fde69f685e7db03be9762e89b2654","_id":"@ap.cx/unicode-range@1.0.2","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-I7t2fNScx9G3Lf1BPwqZ61i6dOAtsIe1ggfeSv04PEv1OLXR70bpxeCC8ne0vTXVP46KCyNdD1b2ki7qB17H0w==","shasum":"d07c19f1fd8bc66240e679e6d6954d88d37979ef","tarball":"https://registry.npmjs.org/@ap.cx/unicode-range/-/unicode-range-1.0.2.tgz","fileCount":10,"unpackedSize":32091,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuIFsH4YuiwHtavREoync5+VFmJjwYW71K3sPIPR3KBgIgPEAYNT+DrwrOVIAhBRsccbK3k4l3AZuVhHHdeM7ipGU="}]},"_npmUser":{"name":"thierryc","email":"info@autreplanete.com"},"directories":{},"maintainers":[{"name":"thierryc","email":"info@autreplanete.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unicode-range_1.0.2_1691666398350_0.9363104154899908"},"_hasShrinkwrap":false},"1.1.0":{"name":"@ap.cx/unicode-range","version":"1.1.0","description":"`@ap.cx/unicode-range` is a collection of utility functions for generating and manipulating Unicode values.","source":"src/index.ts","main":"dist/unicode-range.js","module":"dist/unicode-range.esm.js","types":"dist/index.d.ts","scripts":{"build":"rollup -c","specs":"jest --coverage","lint":"eslint --ext.ts src","test":" npm run lint && npm run build && npm run specs","prepublish":"npm test"},"author":"","license":"ISC","devDependencies":{"@types/jest":"^29.5.3","@typescript-eslint/eslint-plugin":"^6.3.0","@typescript-eslint/parser":"^6.3.0","eslint":"^8.46.0","jest":"^29.6.2","parcel":"^2.9.3","rollup-plugin-terser":"^7.0.2","rollup-plugin-ts":"^3.4.4","ts-jest":"^29.1.1","typescript":"^5.1.6"},"gitHead":"8521a8271f209cf8a3ba32beebc01519110e3875","_id":"@ap.cx/unicode-range@1.1.0","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-f141dcd6mnUi9PrqgwmnJnT4jFsCaJmZKjkRZJ2LL/37lhXPRbWg5oGufCdrtJwAlzCoE+XFHmYUiqR9S7Ph9g==","shasum":"a42e44a9b75b7925544981f0b663c584b1edb2b6","tarball":"https://registry.npmjs.org/@ap.cx/unicode-range/-/unicode-range-1.1.0.tgz","fileCount":13,"unpackedSize":31639,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDz5BtBBGgdjZ9z/uc5eu0GMKUBewAU+MBLuEiBsLWBsQIhALlHQls/t1EFeCPhRKLxJUdlBDpw1kbBJogbmaHl5BJI"}]},"_npmUser":{"name":"thierryc","email":"info@autreplanete.com"},"directories":{},"maintainers":[{"name":"thierryc","email":"info@autreplanete.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unicode-range_1.1.0_1691672790571_0.4169585190454579"},"_hasShrinkwrap":false},"1.2.0":{"name":"@ap.cx/unicode-range","version":"1.2.0","description":"`@ap.cx/unicode-range` is a collection of utility functions for generating and manipulating Unicode values.","source":"src/index.ts","main":"dist/unicode-range.js","module":"dist/unicode-range.esm.js","types":"dist/index.d.ts","scripts":{"build":"rollup -c","specs":"jest --coverage","lint":"eslint --ext.ts src","test":" npm run lint && npm run build && npm run specs","prepublish":"npm test"},"author":"","license":"ISC","devDependencies":{"@types/jest":"^29.5.3","@typescript-eslint/eslint-plugin":"^6.3.0","@typescript-eslint/parser":"^6.3.0","eslint":"^8.46.0","jest":"^29.6.2","parcel":"^2.9.3","rollup-plugin-terser":"^7.0.2","rollup-plugin-ts":"^3.4.4","ts-jest":"^29.1.1","typescript":"^5.1.6"},"gitHead":"8521a8271f209cf8a3ba32beebc01519110e3875","_id":"@ap.cx/unicode-range@1.2.0","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-ZPWjhqaTtt25McF6LU5fNxoK5Z+8nbsr9GYHv1mFGTLp14NwYreyqCGsRbaNNW2e2NEqAxKsZN3uucHk54UMdA==","shasum":"e8b635d7caa38193e710cb7432b8dbe636980c49","tarball":"https://registry.npmjs.org/@ap.cx/unicode-range/-/unicode-range-1.2.0.tgz","fileCount":13,"unpackedSize":32451,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHuptC8IH5gu7KiXZEZ5DJL0w0Ri39DEa6LGfJQB5ZodAiAUzAmtDgE5PfFMZgv9rI7pfwIEPJJh+RnaX9Kys5wIxA=="}]},"_npmUser":{"name":"thierryc","email":"info@autreplanete.com"},"directories":{},"maintainers":[{"name":"thierryc","email":"info@autreplanete.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unicode-range_1.2.0_1691676450626_0.28903264052335875"},"_hasShrinkwrap":false},"1.3.0":{"name":"@ap.cx/unicode-range","version":"1.3.0","description":"`@ap.cx/unicode-range` is a collection of utility functions for generating and manipulating Unicode values.","source":"src/index.ts","main":"dist/unicode-range.js","module":"dist/unicode-range.esm.js","types":"dist/index.d.ts","scripts":{"build":"rollup -c","specs":"jest --coverage","lint":"eslint --ext.ts src","test":" npm run lint && npm run build && npm run specs","prepublish":"npm test"},"author":"","license":"ISC","devDependencies":{"@types/jest":"^29.5.3","@typescript-eslint/eslint-plugin":"^6.3.0","@typescript-eslint/parser":"^6.3.0","eslint":"^8.46.0","jest":"^29.6.2","parcel":"^2.9.3","rollup-plugin-terser":"^7.0.2","rollup-plugin-ts":"^3.4.4","ts-jest":"^29.1.1","typescript":"^5.1.6"},"gitHead":"f4141b803ab77431bdccbbaabfeef6619d005766","_id":"@ap.cx/unicode-range@1.3.0","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-Z0I1+1e4dW8k62U3G4+rkXh1uj95kl5CMf6MNA6g2w/fgbXhQooZ1b5JrhJGJLo9Qp69m/OzOOefDUrRn1QUtw==","shasum":"9d7d8bfc646946b629f8988d8a33527423c0b8e1","tarball":"https://registry.npmjs.org/@ap.cx/unicode-range/-/unicode-range-1.3.0.tgz","fileCount":13,"unpackedSize":36043,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHBUd6drrZytUIILvQoM3WSAGvaN0+rbTQ6nFPpMGoIhAiAa4evltqlGDcTm3c858d7PkvRGGNDfDLPB1ZQW04Ytgw=="}]},"_npmUser":{"name":"thierryc","email":"info@autreplanete.com"},"directories":{},"maintainers":[{"name":"thierryc","email":"info@autreplanete.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unicode-range_1.3.0_1691700064504_0.3190006223267452"},"_hasShrinkwrap":false},"1.4.0":{"name":"@ap.cx/unicode-range","version":"1.4.0","description":"`@ap.cx/unicode-range` is a collection of utility functions for generating and manipulating Unicode values.","source":"src/index.ts","main":"dist/unicode-range.js","module":"dist/unicode-range.esm.js","types":"dist/index.d.ts","scripts":{"build":"rollup -c","specs":"jest --coverage","lint":"eslint --ext.ts src","test":" npm run lint && npm run build && npm run specs","prepublish":"npm test"},"author":"","license":"ISC","devDependencies":{"@types/jest":"^29.5.3","@typescript-eslint/eslint-plugin":"^6.3.0","@typescript-eslint/parser":"^6.3.0","eslint":"^8.46.0","jest":"^29.6.2","parcel":"^2.9.3","rollup-plugin-terser":"^7.0.2","rollup-plugin-ts":"^3.4.4","ts-jest":"^29.1.1","typescript":"^5.1.6"},"gitHead":"6721d5d5b289f98b41d146e1dc9e637b3c25836b","_id":"@ap.cx/unicode-range@1.4.0","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-DjJmqF6fCM4h0qmBMDtoCsYCxvmaIOqq+VxtnHcmpHRT1VBCzXTWYIgcBwl+kszr+JahEwCOQ4Sw1BPx8/1JbA==","shasum":"a6294f09b7e3126b199cdbc101a7e0c4177feb61","tarball":"https://registry.npmjs.org/@ap.cx/unicode-range/-/unicode-range-1.4.0.tgz","fileCount":13,"unpackedSize":36381,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwnNdHpPuj/CWDNwRWCGJs9V0YNJe6eIFBwrujugRORwIgW4Ao9ke4C4xtv7jsszmT65/HF9uOTeEkwB3IooyLn1k="}]},"_npmUser":{"name":"thierryc","email":"info@autreplanete.com"},"directories":{},"maintainers":[{"name":"thierryc","email":"info@autreplanete.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unicode-range_1.4.0_1691701033822_0.22737705532402464"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-10T10:33:43.542Z","1.0.0":"2023-08-10T10:33:43.816Z","modified":"2023-08-10T20:57:14.182Z","1.0.1":"2023-08-10T10:47:15.047Z","1.0.2":"2023-08-10T11:19:58.543Z","1.1.0":"2023-08-10T13:06:30.844Z","1.2.0":"2023-08-10T14:07:30.793Z","1.3.0":"2023-08-10T20:41:04.672Z","1.4.0":"2023-08-10T20:57:13.983Z"},"maintainers":[{"name":"thierryc","email":"info@autreplanete.com"}],"description":"`@ap.cx/unicode-range` is a collection of utility functions for generating and manipulating Unicode values.","license":"ISC","readme":"\n\n# Unicode Range Conversion Functions\n\n`@ap.cx/unicode-range` is a collection of utility functions for generating and manipulating Unicode values.\n\n## Installation\n\n```bash\nnpm install @ap.cx/unicode-range\n```\n\n## Usage\n\nImport the functions you need from the package:\n\n```javascript\nimport { \n    range, \n    compactRanges, \n    convertToHexValues, \n    convertToUnicodeString, \n    convertStringToCompactRanges, \n    flattenNestedArray, \n    getArrayIntersection,\n    getMissingValues,\n} from '@ap.cx/unicode-range';\n\nor\n\nimport * as u from '@ap.cx/unicode-range';\n\n```\n\n## Functions\n\n### `range(start: number, end: number): number[]`\n\nGenerates a range of numbers from `start` to `end`.\n\n### `compactRanges(arr: number[]): (number | [number, number])[]`\n\nGenerates compact ranges from an array of numbers.\n\n### `convertToHexValues(compactRanges: (number | [number, number])[]): (string | [string, string])[]`\n\nConverts compact ranges to hex values.\n\n### `convertToUnicodeString(compactRanges: (number | [number, number])[]): string`\n\nConverts compact ranges to a Unicode string.\n\n### `convertStringToCompactRanges(unicodeString: string): (number | [number, number])[]`\n\nConverts a Unicode string to compact ranges.\n\n### `flattenNestedArray(input: (number | [number, number])[]): number[]`\n\nFlattens a nested array of numbers and ranges into a flat array of numbers.\n\n### `getArrayIntersection(array1, array2)`\n\nA utility function that returns the intersection of two arrays.\n\nReturns an array containing the common elements between `array1` and `array2`.\n\n- `array1` (Array): The first input array.\n- `array2` (Array): The second input array.\n\nReturns: An array containing the common elements.\n\n### `getMissingValues(array1, array2)`\n\nThe `getMissingValues` function returns an array containing all the values from the first array that are not present in the second array.\n\n- `array1` (Array): The array from which missing values will be extracted.\n- `array2` (Array): The array against which the values will be compared to find the missing values.\n\nReturns (Array): An array containing all the values from `array1` that are not present in `array2`.\n\n## Examples\n\n```javascript\nconst result = range(1, 5);\n// Output: [1, 2, 3, 4, 5]\n\nconst compactRanges = [1, 2, 3, 6, 7, 8, 9, 11, 15];\nconst result = compactRanges(compactRanges);\n// Output: [[1, 3], [6, 9], 11, 15]\n\nconst compactRanges = [[1, 3], [6, 9], 11, 15];\nconst result = convertToHexValues(compactRanges);\n// Output: [['0x0001', '0x0003'], ['0x0006', '0x0009'], '0x000B', '0x000F']\n\nconst compactRanges = [[1, 3], [6, 9], 11, 15];\nconst result = convertToUnicodeString(compactRanges);\n// Output: 'U+0001-0003, U+0006-0009, U+000B, U+000F'\n\nconst unicodeString = 'U+0001-0003, U+0006-0009, U+000B, U+000F';\nconst result = convertStringToCompactRanges(unicodeString);\n// Output: [[1, 3], [6, 9], 11, 15]\n\nconst nestedArray = [[1, 3], [6, 9], 11, 15];\nconst flattenedArray = flattenNestedArray(nestedArray);\n// Output: [1, 2, 3, 6, 7, 8, 9, 11, 15]\n\nconst array1 = [1, 2, 3, 4, 5];\nconst array2 = [3, 4, 5, 6, 7];\n\nconst intersection = getArrayIntersection(array1, array2);\n// Output: [3, 4, 5]\n\nconst array1 = [1, 2, 3, 4, 5];\nconst array2 = [2, 4, 6, 8];\nconst missingValues = getMissingValues(array1, array2);\n// Output: [1, 3, 5]\n\n\n```\n\n## Running Tests\n\nMake sure you have Jest installed, and run the tests:\n\n```bash\nnpm test\n```\n\n## License\n\nThis package is licensed under the [MIT License](LICENSE).\n\n\n","readmeFilename":"README.md"}