match-at

WebJar for match-at

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

match-at
Last Version

Last Version

0.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

match-at
WebJar for match-at
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sophiebits/match-at

Download match-at

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/match-at/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>match-at</artifactId>
    <version>0.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/match-at/
implementation 'org.webjars.npm:match-at:0.1.1'
// https://jarcasting.com/artifacts/org.webjars.npm/match-at/
implementation ("org.webjars.npm:match-at:0.1.1")
'org.webjars.npm:match-at:jar:0.1.1'
<dependency org="org.webjars.npm" name="match-at" rev="0.1.1">
  <artifact name="match-at" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='match-at', version='0.1.1')
)
libraryDependencies += "org.webjars.npm" % "match-at" % "0.1.1"
[org.webjars.npm/match-at "0.1.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

match-at Build Status

Introduction

Like String.prototype.match if it only checked the regex at the given index instead of searching the entire string.

matchAt(/world/, 'hello world', 6);  // ['world']
matchAt(/world/, 'hello world', 0);  // null

Almost like 'hello world'.slice(i).match(/^world/) except the resulting match object's .index property corresponds to the original string, and it doesn't actually slice the string. Most engines optimize taking a substring so this probably isn't particularly valuable in practice, but it was an entertaining exercise and could be useful if you reminisce about these semantics.

License

MIT.

Versions

Version
0.1.1
0.1.0