https://github.com/cheminfo/ensure-string

https://github.com/cheminfo/ensure-string

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.4%) to scientific vocabulary

Keywords

hacktoberfest

Keywords from Contributors

bruker jcamp jcamp-dx jeol nmr nmr-parser nmr-spectroscopy
Last synced: 9 months ago · JSON representation

Repository

Basic Info
Statistics
  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
hacktoberfest
Created about 5 years ago · Last pushed over 3 years ago
Metadata Files
Readme Changelog License

README.md

ensure-string

NPM version build status Test coverage npm download DOI

If required, convert the input value to a string.

The input value may be a Buffer, ArrayBuffer, Int8Array.

By default the conversion will consider that the text encoding is utf-8. If the file contains an UTF-16 byte-order mark (BOM), this will be detected and default to utf-16le or utf-16be accordingly.

If the input value is a text, no change is done. The method returns the value without further processing.

Installation

$ npm i ensure-string

Usage

We have a text.txt file containing the string ABC.

js import { ensureString } from '..'; import { readFileSync } from 'fs'; import { join } from 'path'; const blob = readFileSync(join(__dirname, 'test.txt')); // read the file as an ArrayBuffer const text = ensureString(blob); console.log(text); // the text is a string containing ÀBC`

API Documentation

License

MIT

Owner

  • Name: Cheminfo
  • Login: cheminfo
  • Kind: organization

GitHub Events

Total
Last Year

Committers

Last synced: about 3 years ago

All Time
  • Total Commits: 27
  • Total Committers: 4
  • Avg Commits per committer: 6.75
  • Development Distribution Score (DDS): 0.593
Past Year
  • Commits: 2
  • Committers: 1
  • Avg Commits per committer: 2.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Luc Patiny l****c@p****m 11
Luc Patiny l****y@u****m 8
cheminfo-bot 1****t@u****m 5
Michaël Zasso t****s@p****m 3
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 1
  • Total pull requests: 8
  • Average time to close issues: about 1 hour
  • Average time to close pull requests: about 2 hours
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 1.5
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • targos (1)
Pull Request Authors
  • cheminfo-bot (5)
  • lpatiny (3)
Top Labels
Issue Labels
Pull Request Labels
autorelease: tagged (5)

Packages

  • Total packages: 1
  • Total downloads:
    • npm 10,372 last-month
  • Total dependent packages: 14
  • Total dependent repositories: 28
  • Total versions: 5
  • Total maintainers: 1
npmjs.org: ensure-string

Ensure that we receive a text even if an ArrayBuffer is sent

  • Versions: 5
  • Dependent Packages: 14
  • Dependent Repositories: 28
  • Downloads: 10,372 Last month
Rankings
Dependent packages count: 1.6%
Downloads: 1.7%
Dependent repos count: 2.4%
Average: 8.4%
Forks count: 15.4%
Stargazers count: 20.9%
Maintainers (1)
Last synced: 10 months ago

Dependencies

package.json npm
  • @types/jest ^27.4.1 development
  • eslint ^8.13.0 development
  • eslint-config-cheminfo-typescript ^10.4.0 development
  • jest ^27.5.1 development
  • prettier ^2.6.2 development
  • rimraf ^3.0.2 development
  • ts-jest ^27.1.4 development
  • typescript ^4.6.3 development
  • cheminfo-types ^1.1.0
  • isutf8 ^4.0.0