New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

needle-string

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

needle-string

Count case-sensitive occurrences of a string in a string (like needles in a haystack)

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

needle-string

Count case-sensitive occurrences of a string in a string (like needles in a haystack)

Build Status

Install

$ npm install --save needle-string

Usage

const needles = require('needle-string');

needles('magical unicorns are magic', 'magic');
//=> 2

API

needleString(haystack, needle)

Returns the number of case-sensitive strings ('needles') in a string ('haystack') of text.

haystack

Type: string

The string of text you want to search.

needle

Type: string

The string you want to count the occurrences of.

License

MIT © Michael Wuergler

Keywords

find

FAQs

Package last updated on 05 Jul 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