1.0.2 • Published 11 months ago

nv-string-psfix-ptrn v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

nv-string-psfix-ptrn

  • simple util to split a word to prefix AND suffix, same as str.slice
  • readable version of nv-array-psfix
  • for match small string using
  • this should ONLY be used in REPL or compile-time(to generate template for str-materials), coz its very SLOW

install

  • npm install nv-string-psfix-ptrn

splitted

usage

  const x   = require("nv-string-psfix-ptrn");

example

		> x("ababab")
		{
		  prefix: [ 'a', 'ab', 'aba', 'abab', 'ababa' ],
		  suffix: [ 'babab', 'abab', 'bab', 'ab', 'b' ],
		  union: [
		    'a',     'ab',
		    'aba',   'abab',
		    'ababa', 'b',
		    'bab',   'babab'
		  ],
		  shared: [ 'ab', 'abab' ]
		}
		> 
		> 
		> 

METHODS

APIS

LICENSE

  • ISC
1.0.2

11 months ago

1.0.1

11 months ago