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

examjs

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

examjs

You can use this library for examing something for something

  • 4.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Exam.js

You can use this library for examing something for something :)

Installation & Usage

npm install --save examjs
let exam = require("examjs")

Compatibility

  • IE9+, Edge, Chrome, Opera, Firefox, Safari
  • Node.js

API

MethodDescriptionParamsCode
examinital methodStringexam("You want to check this string?")
exactfind for exact, letter to letter matchesArray [, callback]exam("Some string in there").exact(["some", "in", "no"])
atLeastfind for at least some matchesArray [, callback]exam("Some string in there").atLeast(["some", "in", "no"])

Notes

  • exact and atLeast functions returns Promise if you didn't specify the callback as a second argument
  • all results are case insensitive

Simple usage

exam("In our village, folks say God crumbles up the old moon into stars. Перевод недоступен.")
	.atLeast(["our", "moon", "vill", "перев"], result => {
		console.log(result)
		/* -->
			{
				found: [ 'our', 'moon', 'vill', 'перев' ],
				notfound: null,
				filters: [ 'our', 'moon', 'vill', 'перев' ],
				examing: 'in our village, folks say god crumbles up the old moon into stars. перевод недоступен.',
				mode: 'soft',
				only: { yep: true }
			}
		*/
	})
exam("In our village, folks say God crumbles up the old moon into stars. Перевод недоступен.")
	.exact(["our", "перевод", "vill", "перев"])
	.then( result => {
		console.log(result)
		/* -->
			{
				found: [ 'our', 'перевод' ],
				notfound: [ 'vill', 'перев' ],
				filters: [ 'our', 'перевод', 'vill', 'перев' ],
				examing: 'in our village, folks say god crumbles up the old moon into stars. перевод недоступен.',
				mode: 'strict'
			}
		*/
	})

FAQs

Package last updated on 21 Apr 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