Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

punc

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

punc

Ever wonder what your favorite books look like without words?

  • 1.2.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
Maintainers
1
Weekly downloads
 
Created
Source

Punc

Read a file, remove the words, see all the punctuations.

image

npm Travis

Installation

npm install punc

Example Usage #1


'use strict'

const Punc = require('./index')

Punc('alice.txt', 'utf8')
  .then(book => {
    console.log(book.count)
    console.log(book.body)
  })
  .catch(error => {
    console.log(error)
  })

Output found: here

Documentation

Please see the wiki.

Features

  1. removes words and numbers from a file leaving only punctuations.
  2. counts each punctuation seen.
  3. words per sentence average.
  4. same as (#1) but instead replaces each character found with an empty space.

Notes

  • Punctuations to keep when removing words:

    ; : ' " , ! ? . ( ) -

  • Punctuations to use when counting occurances:

    ; : ' " , ! ? .

Inspiration

this article on medium which was in-turn inspired by this article*

License

MIT

Keywords

FAQs

Package last updated on 11 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc